ImageOptimize
Version 4.0.14
February 13, 2025
Fixed
- Fixed an issue where an exception could be thrown using the default "shortcut" syntax due to a regression (#422)
Version 4.0.13
February 12, 2025
Added
- Added the
.placeholder('none')parameter to allow specifying that no placeholder background image CSS should be used for lazy loaded images (useful for transparent PNGs) (#410)
Changed
- Update buildchain to Vite 6 & Tailwind CSS 4
Version 4.0.10
October 21, 2024
Version 4.0.8
May 9, 2024
Fixed
- Fixed an issue where the
.imgTag()and.pictureTag()would output and invalidstyleattribute for lazy loaded images (#400)
Version 4.0.7
April 4, 2024
Added
- Added the ability to pass in a config array to
.imgTag(),.pictureTag()and.linkPreloadTag()
Changed
- Changed
.loading()→.loadingStrategy(),.artDirection()→addSourceFrom()
Version 4.0.6
April 2, 2024
Added
- Added a
--queueoption to theimage-optimize/optimize/createconsole command if you want to defer the image generation to be run via queue job, rather than immediately via the console command - Add
phpstanandecscode linting - Add
code-analysis.yamlGitHub action - Add
.imgTag()to theOptimizedImagemodel, which generates a complete<img>tag from theOptimizedImage - Add
.pictureTag()to theOptimizedImagemodel, which generates a complete<picture>tag from theOptimizedImage - Add
.linkPreloadTag()to theOptimizedImagemodel, which generates a complete<link rel="preload">tag from theOptimizedImage - Add
craft.imageOptimize.renderLazySizesJs()to render the LazySizes JavaScript for lazy loading images - Add
craft.imageOptimize.renderLazySizesFallbackJs()to render the LazySizes JavaScript with a support script that uses LazySizes as a fallback for browsers that don't support theloadingproperty
Changed
- Added PDF to the Ignore Files field settings (#364)
- Updated docs to use node 20 & a new sitemap plugin
- Switch over to Vite
^5.0.0& Node^20.0.0for the buildchain - PHPstan code cleanup
- ECS code cleanup
Version 4.0.5
May 19, 2023
Changed
- Automate release generation via GitHub action
- Add versioning to the docs
Fixed
Version 4.0.4
February 9, 2023
Changed
- Use dynamic docker container name & port for the
buildchain - Update the
buildchainto use Vite^4.0.0 - Updated docs to use VitePress
^1.0.0-alpha.29 - Refactored the docs buildchain to use a dynamic docker container setup
Version 4.0.3
November 17, 2022
Changed
- Fixed HMR in local dev with explicit alias that resolves to the actual directory
Fixed
- Fixed an issue where the
craft image-optimize/optimize/createCLI command did not properly optimize all images (#350) - Fixed an issue which caused the Imgix
autoto no longer work for auto format (#357) - Fixed a JavaScript console error in field settings due to Garnish shuffling around how things work for menus
- Fixed an issue where
srcsetWidth()wouldn't return the proper variant, due to strict comparison operator (#327) - Fixed an issue where using a transform method other than Craft along with
asset.getUrl()in your templates could throw an exception (#363)
Version 4.0.2
July 17, 2022
Changed
- Add
allow-pluginstocomposer.jsonto allow CI tests to work
Fixed
- Fixed an issue where transforms don't get deleted on remote volumes if the format was set to
auto(#341) - Normalize for lowercase file extensions and normalize
jpeg->jpgeverywhere
Version 4.0.0
June 28, 2022
Changed
- If there's no transform requested, and we're not using some external service for image transforms, return
nullso other plugins have a crack at it
Fixed
- Set the variant format to the current asset format if it is left empty, otherwise Craft recursively calls
getTransformUrl()and hangs the queue (#329) (#343) - Fixed an issue where variants would not resave under certain circumstance due to a typing issue (#335)
- Make the properties in the
OptimizedImagenullable to avoid null property values throwing an exception (#345) - Fixed an issue that caused sub-folders to not appear in the OptimizedImages field settings (#333)
- Fixed an issue that could cause JavaScript errors for newly created OptimizedImages fields, and in slideouts (#344)
Version 4.0.0-beta.3
April 8, 2022
Fixed
- Fix
ImageTransform::getAssetUri()to properly handle S3 and other volume sub-directories
Version 4.0.0-beta.2
April 8, 2022
Fixed
- Fixed an issue with properties not being initialized before being accessed, which would cause image uploads to fail (#323)
Version 4.0.0-beta.1
March 23, 2022
Added
- Initial Craft CMS 4 compatibility