Version 2.2.2

July 18, 2023

Added

  • Added the PRO edition of the plugin. This edition adds "Image variants" field which allows admins to define picture configuration in the control panel. Field is assigned to the asset source and picture configuration can be set for the whole asset source (using the field settings), or for the specific asset (using the field values).
  • Added the third parameter to pictureMultiple function - "common settings". It allows to define transform settings that will be used in all sources of picture element.

Fixed

  • Updated deprecation message for deprecated functions, so developers are aware that new functions have different syntaxt compared to deprecated ones.
  • Fixed the issue with adding width and height attributes to sources causing performance issues.

Version 2.1.2

May 19, 2023

Changed

  • Default placeholder mode now is now file - compared to pre 2.1.0 svg mode. If you want to keep using SVG mode, set placeholderMode to svg in image-toolbox.php config file.
  • Before 2.1.0, placeholder url mode was enabled just by entering URL value into placeholderUrl plugin setting. Now it also needs to be enabled by setting placeholderMode to url in image-toolbox.php config file.

Version 2.1.0

May 19, 2023

Added

  • Added pictureMultiple() method, allowing for generating picture element with each source using different asset.
  • Added file placeholder mode, which generates placeholders based on source image file.
  • Transform layouts can now define HTML attributes using anonymous function. This allows defining attributes using asset object attributes.
  • Transform layouts and pictureMultiple() methods can use control panel defined image transforms.

Fixed

  • Fixed bug with placeholder not generating correctly when showing width and height is enabled.
  • Fixed bug with of throwing error whan trying to get width and height of svg file.

Deprecated

  • picture(), pictureMedia(), pictureMax() and pictureMin() are now deprecated.

Version 2.0.2

May 15, 2023

Fixed

  • Width and height attributes are now properly calculated when width or height is missing from the transform.
  • Width and height attributes are now added to the fallback img tag of picture element.
  • Fixed the bug with width being used for height attribute if no transform settings were used for generating picture element.

Version 2.0.1

April 13, 2023

Added

  • Added support for displaying width and height attributes on image sources when "useWidthHeightAttributes" setting is set to true

Version 2.0.0

May 25, 2022

Added

  • Added Craft CMS 4 support

Fixed

  • Fixed bug with pictureMedia() throwing error if asset was null and one of breakpoints transform was also also null.
  • Fixed bug with picture() function throwing error if asset was null and no transform array was given.

Version 1.1.0

March 11, 2021

Added

  • Added forceWebp config setting.
  • Added forcePlaceholders config setting.

Fixed

  • Code refactoring

Version 1.0.0

October 18, 2020

Added

  • Initial release