---
application: "Intervention Image"
version: "Version 3"
status: "stable"
---

# Upgrade Guide

## Upgrade from Intervention Image 2.x to 3.x

Learn how to quickly migrate from Intervention Image version 2 to version 3. See what new features are available and what changes have been made in the update.


## New Features

Intervention Image 3 has been rewritten from the ground up with very little code carried
over from the previous version. This means a more modern and sophisticated
architecture and API that takes advantage of the modern features of PHP 8+.
There are a few key features that further improve the library.

- [Support of animated GIF with GD and Imagick drivers](https://image.intervention.io/v3/basics/instantiation#create-animations.md)
- [Configurable Image Manager](https://image.intervention.io/v3/basics/configuration-drivers#create-a-new-image-manager-instance.md)
- [Support for colorspaces](https://image.intervention.io/v3/basics/colors#colorspaces.md)
- [Support for text wrapping in font system](https://image.intervention.io/v3/modifying-images/text-fonts.md)
- [Support for line height in font system](https://image.intervention.io/v3/modifying-images/text-fonts.md)
- [Object for encoded images](https://image.intervention.io/v3/basics/image-output#handling-of-encoded-image-data.md)

## API Changes

- [canvas()](https://image.intervention.io/v2/api/canvas.md) is now handled by [create()](https://image.intervention.io/v3/basics/instantiation#creating-new-images.md)
- [circle()](https://image.intervention.io/v2/api/circle.md) is now handled by [drawCircle()](https://image.intervention.io/v3/modifying-images/drawing#drawing-a-circle.md)
- [crop()](https://image.intervention.io/v2/api/crop.md) still exists but has a new [signature](https://image.intervention.io/v3/modifying-images/resizing#crop-image.md)
- [ellipse()](https://image.intervention.io/v2/api/ellipse.md) is now handled by [drawEllipse()](https://image.intervention.io/v3/modifying-images/drawing#drawing-ellipses.md)
- [line()](https://image.intervention.io/v2/api/line.md) has been replaced by [drawLine()](https://image.intervention.io/v3/modifying-images/drawing#drawing-a-line.md)
- [pixel()](https://image.intervention.io/v2/api/pixel.md) is handled by [drawPixel()](https://image.intervention.io/v3/modifying-images/drawing#drawing-a-pixel.md)
- [encode()](https://image.intervention.io/v2/api/encode.md) still exists but has a new [signature](https://image.intervention.io/v3/basics/image-output#encoding-images.md)
- [exif()](https://image.intervention.io/v2/api/exif.md) is now handled by [exif()](https://image.intervention.io/v3/basics/meta-information#exif-information.md) with a different signature
- [fill()](https://image.intervention.io/v3/modifying-images/drawing#fill-images-with-color.md) currently only supports color values
- [filter()](https://image.intervention.io/v2/api/filter.md) is now handled by [modify()](https://image.intervention.io/v3/modifying-images/custom-modifiers.md)
- [flip()](https://image.intervention.io/v2/api/flip.md) still exists but has a new signature and is handled by [flip()](https://image.intervention.io/v3/modifying-images/effects#mirror-image-horizontally.md) and [flop()](https://image.intervention.io/v3/modifying-images/effects#mirror-image-vertically.md)
- [insert()](https://image.intervention.io/v2/api/insert.md) has been replaced by [place()](https://image.intervention.io/v3/modifying-images/inserting.md)
- [make()](https://image.intervention.io/v2/api/make.md) has been replaced by [read()](https://image.intervention.io/v3/basics/instantiation#reading-image-sources.md)
- [mime()](https://image.intervention.io/v2/api/make.md) is now handled by an [encoded image](https://image.intervention.io/v3/basics/image-output#handling-of-encoded-image-data.md) only
- [pickColor()](https://image.intervention.io/v2/api/pick-color.md) has a different signature without format which is handled by the [color class](https://image.intervention.io/v3/basics/meta-information#reading-colors-of-certain-pixels.md)
- [polygon()](https://image.intervention.io/v2/api/polygon.md) is handled by [drawPolygon()](https://image.intervention.io/v3/modifying-images/drawing#drawing-a-polygon.md)
- [rectangle()](https://image.intervention.io/v2/api/rectangle.md) is handled by [drawRectangle()](https://image.intervention.io/v3/modifying-images/drawing#drawing-a-rectangle.md)
- [text()](https://image.intervention.io/v2/api/text.md) still exists but has a new [signature](https://image.intervention.io/v3/modifying-images/text-fonts.md)
- [resizeCanvas()](https://image.intervention.io/v2/api/resize-canvas.md) still exists but has a new [signature](https://image.intervention.io/v3/modifying-images/resizing.md)
- [limitColors()](https://image.intervention.io/v2/api/limit-colors.md) is handled by [reduceColors](https://image.intervention.io/v3/modifying-images/effects.md)
- [trim()](https://image.intervention.io/v2/api/trim.md) exists as of version `3.6`, but works differently and [automatically removes border areas](https://image.intervention.io/v3/modifying-images/resizing#trim-image.md) of the image with similar colors
- [getCore()](https://image.intervention.io/v2/api/get-core.md) is replaced with [core()](https://image.intervention.io/v3/modifying-images/advanced.md) but behaves completely differently
- [orientate()](https://image.intervention.io/v2/api/orientate.md) is handled by [orient()](https://image.intervention.io/v3/modifying-images/effects#image-orientation-according-to-exif-data.md) and is applied automatically by default ([configurable](https://image.intervention.io/v3/basics/configuration-drivers.md))
- [resize()](https://image.intervention.io/v2/api/resize.md) still exists but has a different signature without a callback. The constraint option combinations are handled in a different way by the following other methods [resizeDown()](https://image.intervention.io/v3/modifying-images/resizing#resize-without-exceeding-the-original-size.md), [scale()](https://image.intervention.io/v3/modifying-images/resizing#scale-images.md) and [scaleDown()](https://image.intervention.io/v3/modifying-images/resizing#scale-images-but-do-not-exceed-the-original-size.md)
- [widen()](https://image.intervention.io/v2/api/widen.md) and [heighten()](https://image.intervention.io/v2/api/heighten.md) are replaced by calling [scale()](https://image.intervention.io/v3/modifying-images/resizing#scale-images.md) and [scaleDown()](https://image.intervention.io/v3/modifying-images/resizing#scale-images-but-do-not-exceed-the-original-size.md) with named arguments
- [fit()](https://image.intervention.io/v2/api/fit.md) is replaced by [cover()](https://image.intervention.io/v3/modifying-images/resizing#fitted-image-resizing.md) and [coverDown()](https://image.intervention.io/v3/modifying-images/resizing#fitted-resizing-without-exceeding-the-original-size.md)

## Removed Features

- [interlace()](https://image.intervention.io/v2/api/interlace.md) no longer exists and is handle by [encoder options](https://image.intervention.io/v3/basics/image-output.md).
- [backup()](https://image.intervention.io/v2/api/backup.md) and [reset()](https://image.intervention.io/v2/api/reset.md) no longer exist but the functionality can be achieved with [native object cloning](https://www.php.net/manual/en/language.oop5.cloning.php)
- [basepath()](https://image.intervention.io/v2/api/base-path.md) no longer exists
- [cache()](https://image.intervention.io/v2/api/cache.md) no longer exists
- [filesize()](https://image.intervention.io/v2/api/filesize.md) no longer exists
- [iptc()](https://image.intervention.io/v2/api/iptc.md) no longer exists
- [mask()](https://image.intervention.io/v2/api/mask.md) no longer exists
- [opacity()](https://image.intervention.io/v2/api/opacity.md) no longer exists
- [psrResponse()](https://image.intervention.io/v2/api/psr-response.md) no longer exists
- [response()](https://image.intervention.io/v2/api/response.md) no longer exists
- [stream()](https://image.intervention.io/v2/api/stream.md) no longer exists but you may use [toFilePointer()](https://image.intervention.io/v3/basics/image-output#transform-encoded-image-to-file-pointer.md)
- [destroy()](https://image.intervention.io/v2/api/destroy.md) no longer exists but you can use PHP's own functions, such as [unset](https://www.php.net/manual/en/function.unset), to free memory

## Other Changes

- The [caching library](https://packagist.org/packages/intervention/imagecache)
  of Intervention Image 2 is not supported by the new version. 

- The service providers for the Laravel framework were removed to avoid a dependency to
  the framework and to highlight Intervention Image rather framework agnostic,
  which it always was. However, there is an [official package for Laravel integration](https://github.com/Intervention/image-laravel)

- It is no longer possible to create images from an URI directly. The data must
  first be loaded by a dedicated HTTP client and then passed to the image
  library. Intervention Image is not responsible for HTTP client operations.

- It is no longer possible to pass color values as array.

- If you use the Laravel framework and a configuration file, it is necessary to
  adjust the `driver` settings option. In version 2, the driver was configured via a
  string such as `gd` or `imagick`. In version 3, this is done via the class
  name of the driver like `Intervention\Image\Drivers\Imagick\Driver`  or
  `Intervention\Image\Drivers\Gd\Driver`. Read [further details about
  configuration](https://image.intervention.io/v3/basics/configuration-drivers.md) and [Laravel Integration](https://image.intervention.io/v3/getting-started/frameworks#laravel.md)

---

## Become a Sponsor

### Intervention Image needs your help to keep the project going

Intervention Image is non-commercial, open source licensed and completely free to use. The considerable
effort required to maintain and develop the software is only possible with the financial support
of sponsors. There are two ways in which you can support this project.

- Support via [GitHub Sponsors](https://github.com/sponsors/Intervention)
- Support via [Ko-Fi](https://ko-fi.com/interventionphp)