Core classFiles\Classes
TransformedImage
Image class that represents an image after it has been transformed
Properties 8
Take no arguments.
Methods 4
Take arguments. The API serialises only getters that need none.
-
#
toFormat(string $targetFormat, ?array $sourceFormats) -
TransformedImage - Convert the image to the target format. Optionally only performs the transformation if the source format is
contained in the provided formats. Using this method, it is possible to convert images matching a certain format
(like png and gif) to the target formats (like jpeg or webp), while leaving other images untouched. -
#
toOptimizedFormat(string $targetFormat) -
TransformedImage - Get the image in an optimized format. Only converts the image if it does not already have the target format,
and if conversion is possible. SVG images are never converted to other formats. -
#
getResized(?int $width, ?int $height, string $resizeStrategy) -
TransformedImage - Get a resized version of the active revision of the image Tries to fetch the image first, otherwise will create and return it Will save the resized copy and potentially also the current image, if the dimensions were not determined previously
No members match the filter.