Skip to content

Retcon v. 2.7.0

Compare
Choose a tag to compare
@mmikkel mmikkel released this 21 Jul 22:11
· 26 commits to master since this release

2.7.0 - 2023-07-22

Added

  • Added a new retconDimensions filter, which can be used to set missing width and height attributes for image nodes.
  • Added a new $allowFilenameAsAltText parameter to the retconAutoAlt filter (default true; will be default false in Retcon 3.0).
  • Added RetconTransformedImage model.

Improved

  • Improved support for CKEditor.

Changed

  • The autoAlt filter now uses the native alt attribute if it has a value (Craft 4 only).
  • When using Imager (X) to transform images, the retconTransform and retconSrcset filters now respect Imager's safeFileFormats configuration setting, i.e. these filters will only attempt to transform jpgs, gifs and pngs out of the box, unless additional formats have been added in Imager's config file.

Fixed

  • Fixed an issue where the retconRemoveEmpty filter would remove self-closing tags.
  • Fixed an issue where DOMDocument could wrap text nodes in <p> tags.
  • Fixed an issue where the retconUnwrap filter could unwrap root nodes.
  • Fixed an issue where the autoAlt filter was unable to retrieve alt value from the source asset.
  • Fixed an issue where the retconAutoAlt filter could use base64 src placeholders could be used for the alt value.
  • Fixed a PHP exception that would occur if using retconTransform or retconSrcset with Imager X named transforms, if the named transform consisted of multiple transforms. Retcon will now use the first transform whenever Imager returns multiple transforms.
  • Fixed an issue where the retconTransform and retconSrcset filters could upscale images even if Craft's upscaleImages setting was set to false.