Version 4.2.3

September 22, 2023

Changed

ā€“ Refactored all post processing of transformed files from CraftTransformer to ImagerService.

  • Changed filename pattern for transformerParams.

Version 4.2.2

August 13, 2023

Fixed

  • Fixed an issue that would make custom encoders fail if there were spaces in paths or filenames (fixes #239).

Version 4.2.1

July 14, 2023

Fixed

  • Fixed an issue that would cause memory leaks for generate commands.

Version 4.2.0.1

July 14, 2023

Fixed

  • Fixed a critical issue that was introduced in 4.2.0.

Version 4.2.0

July 13, 2023

Added

  • Added support for generateFlags in named transforms (addresses #220).
  • Added caching to getDominantColor and getPalette with support for element tag cache breaking (addresses #205).
  • Added element tag cache breaking for blurhash.

Changed

  • Changed output for generate console command, it will now show processed files, making it easier to detect problematic files that halt the generate process.
  • Changed default value for cacheDuration to false (addresses #214).
  • Changed extraction of pixel data for blurhash, a maximum of 100 (width) sample points will be used.

Fixed

  • Fixed an issue where queue jobs would be triggered when runJobsImmediatelyOnAjaxRequests was true (default) even though runQueueAutomatically was set to false (fixes #224).
  • Fixed an issue that would cause memory leaks for generate commands.

Version 4.1.13

May 6, 2023

Added

  • Added imager-x/clear-caches console commands (addresses #212).
  • Added a parameter to only get the base64 encoded image data string from the blurhash placeholder function (addresses #178 again ;))

Fixed

  • Fixed requirement to use the Imager X utility, PRO is no longer needed, the auto generate section is just hidden (adresses #212).
  • Fixed requirement to use the clean console command, PRO is no longer needed.
  • Fixed an issue where some image formats might not be possible source formats for custom encoders, we now opt for only png or jpg (addresses #209).

Version 4.1.12

March 24, 2023

Added

  • Added new blurhash placeholder type (fixes #178)
  • Added new blurhashComponents config setting.

Version 4.1.11

March 5, 2023

Added

  • Added support for {timestamp} in filenamePattern (adresses #200).

Fixed

  • Fixed a minor rounding issue that could occur when using Imgix and allowUpscale was false (fixes #201).

Version 4.1.10

January 31, 2023

Fixed

  • Fixed several issues related to long filenames (fixes #196 and #194).
  • Fixed an issue where images with null dimensions caused Imgix transformer to throw an exception (thanks, @robmcfadden).

Changed

  • Changed type declaration for transformImage template variable to allow for null (fixes #195).

Version 4.1.9.1

January 17, 2023

Fixed

  • Fixed an issue where the parsed frames parameter was not type safe.
  • Fixed an issue where exceptions were not handled correctly.

Version 4.1.9

January 17, 2023

Fixed

  • Fixed an issue with incorrect string concatenation in error message.

Version 4.1.8

November 21, 2022

Fixed

  • Fixed an error that could occur when trying to get image size (fixes #187, thanks @eduardoalonsoalbella).

Version 4.1.7

October 20, 2022

Changed

  • Changed type checking images parameter on srcset helpers to be more lenient (fixes #177).
  • Changed type checking for ratio to be more flexible.

Version 4.1.6

September 26, 2022

Fixed

  • Fixed an issue that prevented Imgix purging from working (fixes #174)

Version 4.1.5

September 23, 2022

Fixed

  • Fixed an issue where a combination of allowUpscale = false, mode = crop and only one dimension (width or height) given, would throw a PHP error if using Imgix as transformer (fixes #173).

Version 4.1.4

September 15, 2022

Fixed

  • Fixed an issue where suppressing exceptions would cause an exception in GraphQL if an exception was suppressed (fixes #170)
  • Fixed an issue where focal point cropping would be off if allowUpscale was false (fixes #168)

Version 4.1.3

September 9, 2022

Added

  • Added support for aliases and environment variables in optimizers (adresses #165)

Fixed

  • Fixed an issue that would prevent Imager from getting the correct width and height for a transform if the source image was an AVIF (fixes #164).
  • Fixed issue where craft.imagerx.transformer() returned a bool instead of a string (fixes #167)

Version 4.1.2

July 13, 2022

Fixed

  • Fixed an issue where file formats unsupported by getimagesize() would return zero width/height, even if the values could be calculated (fixed #157)

Version 4.1.1

June 19, 2022

Added

  • Added EVENT_BEFORE_TRANSFORM_IMAGE and EVENT_AFTER_TRANSFORM_IMAGE events (thanks, @yoannisj).

Fixed

  • Fixed an issue where the use of % in transform params would break transformed image file names.

Version 4.1.0

June 16, 2022

Added

Changed

  • Changed identifier for transformerParams in transform string, we now use TP.

Version 4.0.2

June 15, 2022

Fixed

  • Fixed issue where saving elements without a field layout would throw an error if auto generate by fields were enabled (fixes #153)

Version 4.0.1

May 26, 2022

Fixed

  • Fixed issue with incorrect typing of imagerUrl (fixes #150)

Version 4.0.0

May 4, 2022

Added

  • Craft 4.0 support.
  • Added new Imager X utility with cache clearing, transform generation and debug information.

Removed

  • Removed deprecated config settings useCwebp, cwebpPath, avifEncoderPath, avifEncoderOptions, avifConvertString.
  • Removed deprecated Imgix profile config settings domains and shardStrategy.
  • Removed support for old Imgix purge API endpoint.
  • Removed old generate transforms utility, replaced with Imager utility.
  • Removed Imager caches from Craft's built in cache clearing, use console commands, controller actions or utility instead.

Deprecated

  • Deprecated the use of imgixParams transform parameter, transformerParams should be used instead.

Version 3.5.8

April 29, 2022

Fixed

  • Fixed an issue where colors would be distorted when using letterbox on a non-RGB image (fixes #147).
  • Fixed the use of general magic property when calling getConfig() (thanks @jamesmacwhite).

Version 3.5.7

April 13, 2022

Fixed

  • Fixed an issue where isAnimated would throw an exception if the source file was missing (fixes #137).

Version 3.5.6.1

March 23, 2022

Fixed

  • Fixed a bug introduced when adding limit support to element auto generation (closes #134 (again)).

Version 3.5.6

March 22, 2022

Added

  • Added limit to element auto generate settings (closes #134).
  • Added support for auto generating transforms from images in Neo fields (closes #76).

Version 3.5.5

December 27, 2021

Added

  • Added support for using handle of named transform when using the @imagerTransform GraphQL directive (closes #126).

Fixed

  • Fixed an issue where partially downloaded/zero-byte files could linger in the remote image cache (fixes #124).
  • Fixed an issue that would prevent auto generation to work for certain propagation settings (fixes #121).

Version 3.5.4

November 17, 2021

Added

  • Added console command to clean imagerSystemPath based on cacheDuration (closes #116).

Fixed

  • Fixed an issue where temporary files were not deleted if an error occured when using a custom encoder (fixes #125).
  • Fixed an issue where using cwebp to convert to Webp would fail when using the new custom encoders concept (fixes #125).
  • Fixed an issue where opening corrupted images would throw an exception that was not caught properly (fixes #124).

Version 3.5.3

October 20, 2021

Fixed

  • Fixed an issue in the Imgix transformer where defaultParams would not be possible to override in an intuitive manner.
  • Fixed an issue where an AssetException was not handled (Thanks, @GaryReckard)

Version 3.5.2

July 23, 2021

Added

  • Added imagerTransform field to AssetInterface to enable named transforms in any GraphQL query (thanks, @JoshCoady).
  • Added floodfillpaint and transparentpaint effects (closes #100 , closes #115).

Version 3.5.1

July 23, 2021

Fixed

  • Fixed an issue that would throw an error if a non-existing handle was used in auto generate config (addresses #109).

Version 3.5.0

July 21, 2021

Added

  • Added support for customEncoders.
  • Added support for AVIF encoding through GD (PHP 8.1) and Imagick.
  • Added support for JPEG XL.
  • Added avifQuality and jxlQuality config settings.

Deprecated

  • Deprecated useCwebp, cwebpPath, cwebpOptions, avifEncoderPath, avifEncoderOptions and avifConvertString config settings. Use customEncoders instead.

Version 3.4.1

July 5, 2021

Added

  • Added trim transform parameter (closes #99).

Fixed

  • Fixed an issue that could cause errors when trying to clear transforms in environments without an accessible file system (Thanks, @boboldehampsink).
  • Fixed use of deprecated method deleteCachesByElementId when removing transformed assets (fixes #107).

Version 3.4.0

March 31, 2021

Imager X now requires PHP 7.2.5 or newer.

If you're using the ImageOptim optimizer, it have now been removed from core due to lack of support for PHP 8.0 in a required library. It is instead available as a separate plugin. All you need to do is install it, no code or config changes needed.

Changed

  • Imager X now requires PHP 7.2.5 or higher.
  • ImageOptim optimizer was removed to ensure compability with PHP 8.0 (fixes #94). The optimizer has been split out into a separate package, spacecatninja/imager-x-imageoptim-optimizer, which can be installed to make the optimizer continue working.

Added

  • Added support for blurhash encoding both for local transforms (adresses #67), and through Imgix (adresses #86).
  • Added support for returning a transform in blurhash "format" when using the GraphQL transformImage directive.

Version 3.3.1

March 30, 2021

Fixed

  • Fixed an issue that would create double slashes if addVolumeToPath was set to false.

Version 3.3.0

January 31, 2021

If you're using the Imgix transformer, and have added an API key to enable purging, you need to create a new one since Imgix is deprecating their old API in March. This version of Imager X supports both the old and the new version, but you will get a deprecation error if you use an old API key.

Added

  • Added support for the new Imgix API for purging. Deprecation notices are shown if the old API key appear to be for the old API (fixes #64).

Changed

  • Changed Imgix purging to remove the dependency on Guzzle.

Fixed

  • Fixed a typo that made it impossible to override CacheControl request headers for AWS external storage (fixes #82).

Version 3.2.6

November 22, 2020

Added

  • Added detection of extension from mime type for files without an extension, when no format is given.
  • Added support for targeting assets fields inside SuperTable fields in auto generate config, ie 'superTableField:*.myAssetsField' (closes #75).
  • Added support for wildcards in type parameter when targeting matrix fields in auto generate config, ie 'matrixField:*.myAssetsField'.
  • Added hideClearCachesForUserGroups config setting which can be used to disable the clear cache paths for Imager for certain user groups (closes #68).

Fixed

  • Fixed an issue that would occur if no file extension and no transform format was set (fixes #74).
  • Fixed an issue where getColorPalette would return an incorrect number of colors. This hack mitigates an error in the underlying ColorThief library (fixes #69).

Version 3.2.5

November 13, 2020

Added

  • Added default values for optional parameters in getDominantColor and getColorPalette.

Fixed

  • Fixed an issue where unused/irrelevant parameters wasn't unset before generating the Imgix transform string.

Version 3.2.4

October 15, 2020

Added

  • Added source to transformed images, which can be used to inspect the source model used to generate the transform (closes #58).

Fixed

  • Fixed top margins on fieldset's in generate utility (fixes #59).

Changed

  • Changed default value of registered transformers, the default craft transformer is now added statically to alleviate issues that could occur if an error occured, and the necessary events didn't fire (adresses #56).

Version 3.2.3

October 11, 2020

Added

  • Added support for localizing imagerUrl config setting (closes #55).
  • Added useRawExternalUrl config setting which can be used to opt out of the default external URL encoding (fixes #57).
  • Added transformerConfig that can be used to pass config settings directly to a custom transformer.

Fixed

  • Fixed issue where checkMemoryForImage could throw an exception (fixes #54).

Version 3.2.2

September 22, 2020

Fixed

  • Fixed an issue where uploads to AWS storage would be placed in the wrong path if no subfolder was present due to an initial / (Thanks, @JoshCoady).
  • Fixed an issue that would result in a division by zero exception if an external source image could not be downloaded and/or read (fixes #52).
  • Fixed an issue where an exception was thrown if ColorThief could not analyse an image.
  • Fixed how asset URL is retrieved to avoid Assets::EVENT_GET_ASSET_URL being called unnecessarily.

Version 3.2.1

September 12, 2020

Added

  • Added hasNamedTransform and getNamedTransform template variables (closes #51).
  • Added new clientSupports template variable.

Fixed

  • Fixed an issue where useForNativeTransforms could cause an infinite loop (fixes #50).

Version 3.2.0

September 3, 2020

Added

Version 3.1.7

September 2, 2020

Fixed

  • Fixed an error that would occur when using NoopImageModel because it didn't extend BaseTransformedImageModel (Thanks, @boboldehampsink).

Version 3.1.6

August 27, 2020

Fixed

  • Fixed an issue where using 'transparent' as background color would throw an error.

Version 3.1.5

August 26, 2020

Added

  • Added support for providing the key file contents to the keyFile config setting in Google Cloud external storage, with support for environment variables (closes #38).
  • Added support for passing objects as parameters to effects.

Version 3.1.4

August 19, 2020

Fixed

  • Fixed issues with radial blur and opacity filters when Imagick was compiled with ImageMagick 7+.

Version 3.1.3

August 5, 2020

Added

  • Added brightness effect.

Fixed

  • Fixed an issue that could occur if a local or external image didn't have an extension (related to #41).
  • Fixed an issue where 'transparent' wasn't parsed correctly when used in pad transform parameter.

Version 3.1.2

July 22, 2020

Fixed

  • Fixed an issue where checkbox labels in the generate utility would be HTML-encoded due to a breaking change in Craft 3.5 (fixes #37).

Version 3.1.1

July 5, 2020

Fixed

  • Fixed unnecessary exceptions that could be thrown when trying to delete files that had already been deleted (fixes #35).
  • Fixed an issue where only the first selected volume from the generate utility would be used to generate transforms (fixes #29).

Version 3.1.0.1

July 1, 2020

Fixed

  • Fixed an issue where the new generate transforms utility would be available when using the Lite edition, even though the generate functionality isn't.

Version 3.1.0

July 1, 2020

Added

  • Added generate transforms utility (addresses #29).
  • Added getPalette() to ImgixTransformedImageModel which adds the ability to request color palette information directly from Imgix (adresses #33).
  • Added support for deleting transforms when assets are deleted or moved, hidden behind config setting removeTransformsOnAssetFileops (adresses #21).

Version 3.0.11

June 17, 2020

Added

  • Added option to toggle public visibility to transforms uploaded to S3 (fixes #31).

Version 3.0.10

June 2, 2020

Added

  • Added getPlaceholder method to TransformedImageInterface (fixes #25).

Changed

  • Changed GraphQL directives and queries to use the safeFileFormats setting to avoid trying to transform file formats that aren't transformable (adresses #15 again).

Version 3.0.9

May 7, 2020

Fixed

  • Fixed issue where ImgixTransformedImageModel would return the wrong width and/or height if crop mode fit was used, and both width and height was set (fixes #24).

Version 3.0.8

May 6, 2020

Added

  • Added a return parameter to the imagerTransform GQL directive, to make it possible to return base64-encoded and dataUri's in addition to URL's (adresses #23).

Changed

  • Changed requirement from google/cloud to google/cloud-storage to avoid excessive amounts of packages being included and to stay in line with the relevant flysystem driver (adresses #22).

Version 3.0.7

April 11, 2020

Changed

  • Imager X no longer generates transforms when reindexing asset volumes. Use console commands to mass generate instead (adresses #19).

Version 3.0.6

March 22, 2020

Added

  • Added safeFileFormats setting which is be used to avoid trying to transform file formats that isn't transformable, notably when doing auto generation (adresses #15).

Fixed

  • Fixed deprecated default values in example imgix config (fixes #18).

Version 3.0.5

March 13, 2020

Added

  • Added parsing of callables prior to running fillTransforms, so that callables can be used also for properties that is used as fillAttribute (addresses #13).

Version 3.0.4

March 2, 2020

Fixed

  • Fixed an issue where an elements field layout was null (fixes #12).

Version 3.0.3

February 21, 2020

Fixed

  • Fixed an issue that would cause an exception if the old domains config setting for Imgix was set to a string accidentally.

Version 3.0.2

February 20, 2020

Added

  • Added the ability to use named transforms in named transforms, with safeguards for cyclic references (see issue #7). X-)

Version 3.0.1

February 18, 2020

Fixed

  • Fixed an issue with generate config where only the first config element would be processed (fixes #2).
  • Fixed some issues where Imager would throw an exception if an invalid field was targeted by generate config, and an element was saved.

Version 3.0.0

February 11, 2020

Changed

  • Imager morphed into Imager X. Namespace is now spacecatninja\imagerx, plugin handle is imager-x, and we have editions.
  • Changed how extensions (external storages, effects, transformers and optimizers) are registered, we now use events.

Added

  • Added support for custom transformers.
  • Added support for named transforms.
  • Added support for auto generating transforms on asset upload or element save.
  • Added console commands for generating transforms.
  • Added element action for generating transforms.
  • Added basic support for GraphQL.
  • Added parsing of craft style environment variables ($MY_ENV_VARIABLE) for imagerSystemPath and imagerUrl.
  • Added opacity, gaussian blur, motion blur, radial blur, oil paint, adaptive blur, adaptive sharpen, despeckle, enhance and equalize effects.
  • Added support for fallbackImage (used if an image cannot be found, or an error occurs).
  • Added support for mockImage (used for every transform no matter what's passed in).
  • Added support for pad transform parameter.
  • Added preserveColorProfiles config setting for preserving color profiles even if meta data is being stripped.

Fixed

  • Fixed issues that would occur if external downloads are interrupted and the error can't be caught. Downloads are now saved to a temporary file first.
  • Fixed issues that would occur if a file upload to an external storage fails. The transformed file is now deleted so that Imager can try again.
  • Fixed issue with silhouette placeholder method, it now supports gif and png source files in addition to jpg.
  • Fixed redundant encoding of URLs for the Imgix URL builder after bumping imgix/imgix-php to 3.x.

Deprecated

  • Deprecated domains and shardStrategy Imgix config settings and added domain, due to changes in imgix/imgix-php 3.x.