New Features
Intervention Image 3 has been rewritten from scratch with little code carried
over from previous versions. This means a more modern and sophisticated
architecture and API that takes advantage of modern features from PHP 8.0.
There are a few key features that further improve the library.
API Changes
-
canvas() is now handled by create()
-
circle() is now handled by drawCircle()
-
crop() still exists but has a new signature
-
ellipse() is now handled by drawEllipse()
-
encode() is now handled by toJpeg(), toWebp(), toPng(), toGif(), toBitmap() and toAvif()
-
exif() is now handled by exif() with a different signature
-
fill() currently only supports color values
-
filter() is now handled by modify()
- The resizing methods resize(), fit(), widen() and heighten() have been completely rebuild and are now handled by resize(), resizeDown, scale(), scaleDown(), cover(), coverDown(), pad() and contain()
-
flip() still exists but has a new signature and is handled by flip() and flop()
-
insert() has been replaced by place()
-
line() has been replaced by drawLine()
-
make() has been replaced by read()
-
mime() is now handled by an encoded image only
-
pickColor() has a different signature without format which is handled by the color class
-
pixel() is handled by drawPixel()
-
polygon() is handled by drawPolygon()
-
rectangle() is handled by drawRectangle()
-
save() is handled via an encoded image
-
text() still exists but has a new signature
-
resizeCanvas() still exists but has a new signature
Removed Features
Other Changes
-
The caching library
of Intervention Image 2 is not supported by the new version.
-
The service providers for the Laravel were removed to avoid a dependency to
the framework and to highlight Intervention Image rather framework agnostic,
which it always was.
-
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.