- Automate release generation via GitHub action
- Add versioning to the docs
- Use dynamic docker container name & port for the
buildchain
- Update the
buildchain
to 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
- Fixed HMR in local dev with explicit alias that resolves to the actual directory
- Add
allow-plugins
tocomposer.json
to allow CI tests to work
- 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
->jpg
everywhere
- If there's no transform requested, return
null
so other plugins have a crack at it (#349)
- Fixed an issue that could throw an exception when double-clicking on an asset, due to an incorrect asset bundle path
- If there's no transform requested, and we're not using some external service for image transforms, return
null
so other plugins have a crack at it
- Removed empty
type
on registered script tags, which would prevent them loading via the Vite dev server - Fix syntax errors in
OptimizedImagesField.js
- Fixed an issue that could cause JavaScript errors for newly created OptimizedImages fields, and in slideouts (#344)
- Fixed a regression due to a PR that could cause image variants to not be regenerated after resaving them
- Fixed an issue where an exception could be thrown when running the
craft resave/assets
console command (#78)
- Added in GQL implementation for
srcsetMinWidth
,srcsetMaxWidth
,srcsetMinWidthWebp
&srcsetMaxWidthWebp
. Updated the documentation to show how these are used (#315)
- Only update variants for an existing asset if the image has been manipulated (#314)
- Use the new Imgix purge API endpoint properly (#4)
- Fixed an issue where corrupted images could result in the Imgix transformer throwing an exception (#3) (#306)
- Fixed an issue that could cause the JavaScript to not execute properly, causing the Settings to not appear correctly (#310)
- Add
.gitattributes
&CODEOWNERS
- Add linting to build
- Add compression of assets
- Add bundle visualizer
- Updated the buildchain to use Node 16
- Changed buildchain to Vite from webpack 5
- Create variants via queue when an asset is moved in Craft
^3.7.1
- Fixed the display of WebP images in FireFox, Safari, and other browsers that support WebP, but not from Canvas by improving the WebP support detection method (#301)
- Fixed the SVGO optimizer by ensuring that image processors without
commandOptions
have the resulting command properly padded with a space (#300) - Fixed an issue with the Sharp transform method where transforms could fail if the file extension was not lowercase (#4)
- Fixed an issue where image placeholders would create images in incorrectly large sizes if certain EXIF data was
present, and
preserveExifData
was set totrue
inconfig/general.php
, resulting in a db error when trying to save the encoded image in the field data (#296)
- Fixed an issue where the wrong Imgix API was being used for purging images (#273)
- Special-case for Craft 3.7 or later, with the addition of a suffix to the Field content column name (craftcms/cms#6922) (nystudio107#289)
- Switched documentation system to VitePress
- When an asset is replaced, force the recreation of the variants (nystudio107#283)
- Fixed an issue where uppercase file suffixes would cause webp image variants to not be created (nystudio107#277)
- If
image/svg
is being ignored, addimage/svg+xml
to the mime types to ignore as well - Now store the image sub-folders by name, since the UID can be different per environment (nystudio107#282)
- Added a setting to control the amount an image needs to be scaled down for automatic sharpening to be applied (nystudio107#263)
- Added an option to cap the placeholder silhouette SVG size to 32Kb (nystudio107#270)
- If there are too many sub-folders in an Asset volume, don't display them, return an empty array (nystudio107#203)
- Added
make update
to update NPM packages - Added
make update-clean
to completely removenode_modules/
, then update NPM packages
- Use Tailwind CSS
^2.1.0
with JIT
- Fixed broken link to lower quality retina images article
- Added some additional CLI command logging that shows the savings from optimization
- Don't record or display errors that are a result of assets that are not images
- Don't display image transform errors twice
- Fixed a regression that caused the field settings to not work properly for adding/removing variant blocks (nystudio107#268)
- Updated to latest docs dependencies
- Fixed missing Composer dependency
nystudio107/craft-plugin-manifest
- Move settings from the
composer.json
“extra” to the plugin main class - Move the manifest service registration to the constructor
- Require
nystudio107/craft-imageoptimize-imgix
version^1.2.1
- Return
null
if no transform needs to be done, so other plugins can hook in
- Fixed a regression that caused the image sizes to show up as
???
in the Asset Detail view
- Updated to use
craft-imageoptimize-imgix
version^1.2.0
- Always display sticky errors
- Added error logging for
curl
errors
- Attempt to display optimized image variants even if the image curl fails
- Remove the use of
curl
to obtain the remote image sizes, replacing it with frontend JS
- Fixed parse errors with PHP < 7.3
- Added a
stickyErrors
property to the OptimizedImages model, so we can post-facto display if something went wrong during image generation on the frontend to users - Implemented
useFieldset
for Craft 3.6
- Fixed deprecation errors in Craft CMS 3.5 or later
- Fixed an issue where aspect ratios could be improperly rounded, causing a division by zero error
- Added a ImageOptimize Info Utility that allows you to see the ImageOptimize settings even in environments
where
allowAdminChanges
isfalse
- Added a try/catch block to Imagine calls to handle errors more gracefully
- Split out vendors & commons chunks
- Switch from using
->each()
to usingcraft\db\Paginator
to paginate asset query results, to address out of memory issues on massive queries - ImageOptimize now requires Craft CMS 3.1.19 or later
- Lowercase written instances of "Imgix"
- Added additional logging for image placeholder and color extraction
- Moved the CSS/JS buildchain over to webpack 5
- Updated to latest npm deps
- Fixed improperly generated
webp
URL for Imgix
- If an Optimized Images field is edited, only re-save the transforms for that specific field
- Allow an optional
--field
to be passed into thephp craft image-optimize/optimize/create
console command to only create image variants associated with a specific Optimized Images field - Allow an optional
--force
flag to be passed into thephp craft image-optimize/optimize/create
console command for force image variant creation
- Sped up image optimization on multi-site setups by not spawning a new optimizing images job if the element is merely propagating to other sites
- Fixes issue when using
asset.getUrl({ })
with Imgix, whereformat
would be coerced to the image's extension format, when it should have been left asnull
.
- Cleaned up the field styling to make it look correct on Craft CMS > 3.5.0
- Default to
false
if$variant['useAspectRatio']
is somehow null
- Added support for Redis queue jobs
- If an Optimized Images field isn't set to create variants for the sub-folder that an Asset is in, it'll display N/A
- Cleaned up the field formatting for Craft CMS 3.5 CSS layout changes
- Fixed an issue with
.webp
URLs not working for URLs with ports in them - Make missing webp variants display better
- Fixed an issue where images that were in sub-folders of sub-folders didn't have image variants created for them, if only specific volume sub-folders were chosen for optimization
- Ensure image quality is set to
null
as “Auto” setting of image quality
- Fixed Asset Bundle namespace case
- Added the
create-asset
console command for regenerating the responsive image variants for a single Asset ID
- Generated image URLs that have no file format extension are now properly displayed in the GUI (an issue mostly with serverless Sharp)
- Sanity check the inputs before normalizaing the file format
- Normalize the file format to lowercase before transforming
- Properly documented how the data in the
imageTransformTypeSettings
config is stored
- Fixed an issue where an SVG sent in to an image transform handler as a thumbnail request without specifying another format to convert to
- Fixed an issue where an SVG sent in to image transform handler without specifying another format to convert to
- Fixed an issue where
MTIME
or other query string params could be listed as part of the image format
- Added the ability to retrieve the dominant color palette as RGB values, making things like gradients easier to do
- ImageOptimize will now send back an Imgix or other transform method URL for
asset.getUrl()
with no transform applied
- Added a Preferences item to control whether allow limiting the creation of Optimized Image Variants for images by sub-folders
- Added the ability to choose the sub-folders in an asset volume in which Optimized Image Variants will be created
- Parse volumes sub-folders as environment variables
- If an image is an animated
.gif
file, never change the file format
- Force update to
"nystudio107/craft-imageoptimize-imgix": "^1.1.1"
- Fixed aspect ratio for CP thumbnail images
- Default
createPlaceholderSilhouettes
tofalse
so people need to enable this setting if they want to use them (they can be on the larger side)
- Added support for native GraphQL in Craft 3.3
- Added more robust sanity checking if an invalid URL or path is being passed into
ImageTransform::appendExtension()
- Added support for Sharp via AWS Serverless Image Handler as a Transform Method
- Fixed an issue where ImageOptimize was not handling assets it didn't know how to transform property, resulting in generic thumbnails if you used the Embedded Assets plugin
- Updated
ImageTransformInterface
to remove the deprecated$params
- Added a
lightness
calculation based on a weighted average of the extracted dominant color palette to give you an idea of the image's overall lightness
- Don't force the format for fallback images
- Rebuilt assets to fix npm vulnerabilities
- Fixed an issue where newly added Image Variant blocks had incorrect ids on the Retina checkboxes
- Updated build system
- Updated Twig namespacing to be compliant with deprecated class aliases in 2.7.x
- Fixed an issue where focal points weren't always respected for Imgix
- Fixed an issue where
.env
vars were not actually parsed
- If you're using Craft 3.1, ImageOptimize will use Craft environmental variables for secrets
- Refactored the Imgix and Thumbor Image Transforms out to external packages
- Refactored out the
ImageTransform
interface to use Yii2's DI to allow them to be stand-alone components - Respond to
Assets::EVENT_GET_ASSET_THUMB_URL
for direct thumbnail generation from third party image transform services
- Call
App::maxPowerCaptain()
whenever a queue is manually run (both via web and console request) - Minor Thumbor fixes
- Default format and quality to null so they can be omitted if you're generating transforms via Twig
- Fix an issue with Imgix with images that have no focal point set
- Fix Thumbor focal point order
- Fix a regression that broke images in sub-folders for Imgix
- Retooled the JavaScript build system to be more compatible with edge case server setups
- Added the ability to have OptimizedImages fields ignore
SVG
and/orGIF
files - Added support Thumbor resizing service
- Fixed an issue where volumes with sub-folders such as Amazon S3 or Google Cloud didn't generate the correct URLs
- Fixed the build process so it will no longer look for
devServer
on installs - Added a link to the variant does not exist to aid in diagnosing what is wrong
- Changed the signature of
::getWebPUrl()
to send in all of the transform params
- Add Super Table conditional for field
- Updated build process
- Added a try/catch around ColorThief, to catch errors thrown due to empty/transparent images
- Fix a regression that could cause Optimized Images to not be generated correctly
- Modernized package.json and webpack build
- Fixed an incompatibility with the Spoon plugin by removing
matrix-field
class from field type settings - Fixed an erroneous 2:2 aspect ratio in the default settings
- Moved to a modern webpack build config for the Control Panel
- Added install confetti
- Reverted an errant commit that removed a fix for propagating field data in multi-site environments
- Ensure that
.webp
variants have fully qualified absolute URLs
- Added the ability to access each image variant's height
- Update to the latest version of the Imgix PHP library
- Catch all exceptions that happen during
ResaveOptimizedImages()
job so that execution can continue
- Smarter appending of variant creator suffixes, to handle URLs that have query strings
- Handle JPEGs coming in as both
jpg
&jpeg
for the detected file format - Remove vestigal
empty()
checks
- Improved CraftQL support by allowing parameter passing to
src
andsrcUrls
- Added CraftQL support
- Added additional profiling information
- Added profiling to the image variant creation
- Vastly increase the speed with which the transforms are created when done via Twig templating code
- Increased the speed of the variant creation in general
- Switched over to using the Unsharp Mask (
usm
) filter for auto-sharpening Imgix images
- Removed unused composer dependencies
- Fixed a typo with
$generatePlacholders
that would cause saving images to fail
- Fixed a typo in the
config.php
settings, changedgeneratePlacholders
->generatePlaceholders
- Made the reduced quality of retina images if
lowerQualityRetinaImageVariants
is enabled less aggressive
- Fixed an issue with propagating field data in multi-site environments
- Scrutinizer code cleanup / refactoring
- If
.webp
support isn't configured, we don't display the images for thewebp
variants - If images are being generated via template (not recommended) disable running the image optimizers and variant creators by default
- Added
craft.imageOptimize.serverSupportsWebP()
function to determine whether the server is capable of creating.webp
variants - Added validation rules for
imgixSecurityToken
so the value can be saved in the model
- The lengthy generation of placeholders should really be off by default when doing them via Twig now
- Asset move operations now cause Optimized Image Variants to be re-saved via a non-blocking queue job
- Using Image Optimize via Twig should have less of a performance hit now, since all placeholder image/color palette generation is disabled
- Fixed deprecation errors from Craft CMS 3 RC13
- Show a warning if people try to add an OptimizedImages field in a Matrix block
- Allow for CLI processing of specific Asset Volumes via
image-optimize/optimize/create volumehandle
- Added
automaticallyResaveImageVariants
toconfig.php
to allow disabling of the automatic re-saving of Image Variants for people who want to do it manually via the CLI - Added a
.srcWebp()
method for OptimizedImages - Added an optional
width
parameter that can be passed into.src()
and.srcWebp()
- Added support for mostly deprecated
1x
,2x
, etc. srcsets by passing an optionaltrue
parameter to.srcsetWidth(XXX, true)
and.srcsetWidthWebp(XXX, true)
- Fix more deprecation errors from Craft CMS 3 RC 12
- Fix deprecation errors from Craft CMS 3 RC 12 (which were causing slowdowns)
- Fix a division by 0 error with some custom Craft transforms when using Imgix as a transform method
- Added lightswitch controls to the OptimizedImages field that let you control what is displayed
- Ensure we handle all of the potential
$transform
types passed intoEVENT_GET_ASSET_URL
- Both
createColorPalette
andcreatePlaceholderSilhouettes
are now off by default when usingcraft.imageOptimize.createOptimizedImages()
via Twig, but can be overridden
- Added support for optional security token used to sign image URLs from Imgix
- Added
image-optimize/optimize/create
andimage-optimize/optimize/clear
console commands for command line Optimized Image Variant creation
- Display the non-webp version of an image when it exists, but the browser doesn't support displaying
.webp
- Handles error conditions with
filesize
better
- Resave all asset volumes after the settings are changed (not just the Transform Method)
- Save the Optimized Image Variants via an async queue when possible
- Detect
gd
installation viafunction_exists
instead ofextension_loaded
- Handle protocol-relative siteUrls better
- Fixed an issue where certain settings could not be saved via the Control Panel
- Check to ensure that
GD
is installed before attempting to generate silhouette placeholders - Show a warning on the Settings page if
GD
is not installed
- Removed Edit Image button, since Craft CMS 3 now includes one in the Asset preview
- Removed the
api-key
parameter from Imgix image transform URLs
- Renamed the composer package name to
craft-imageoptimize
- Fixed a regression that broke protocol-relative siteUrls
- Shows an error if an OptimizedImages field is added to anything other than an Asset's layout
- Added a warning if a config setting is being overridden by the
config.php
- Added a number of config settings to the Control Panel GUI
UrlHelper::urlWithProtocol
->UrlHelper::urlWithScheme
for Craft CMS 3 RC7 compatibility- Fixed an issue where you could delete the last Image Variant in the field settings, even though the option was disabled
- Handle the display of Optimized Image Variant names better when coming from Imgix
- Added an Edit Image button to the Optimized Images field view
- Fixed
getWebPUrl()
for the Imgix image transform driver - Fixed an issue where image uploads/changes would fail if you had an invalid or
non-existent
activeImageVariantCreators
set - Fixed an issue with protocol-relative siteUrls
- Fixed a flaw in the default aspect ratios
- Fixed Focal Point resaving issue
- Resaving Optimized Image Variants after making field changes should be quicker now
- Fixed a regression that would cause issues with PHP 7.0 (but not later versions of PHP)
- Handle the case of no Optimize Image Variants being created due to upscaling by just returning the original image
- Made the documentation on the OptimizedImages Field more clear, in that it needs to be added to an Asset Volume's layout
- Added
.getMaxSrcsetWidth()
to work around issues with<img srcset>
choosing sizes larger than are available - Added a max size of 30K for generated silhouette SVGs, at which point it returns a simple SVG box
- Better exception handling
- Image variant creators now clean up after themselves when an Asset transform is deleted
- ImageOptimize now requires at least Craft CMS 3 RC3 or later
- Image transforms that are scaled down >= 50% are now auto-sharpened (controllable via the
autoSharpenScaledImages
setting inconfig.php
) - It's now possible to set the default aspect ratios in the
config.php
- No longer possible delete the last Optimized Image variant
- At least one Optimized Image variant will always be present
- Fixed an issue where
.webp
variants would not be created
- Re-create the Responsive Image Variants when an Asset is replaced
- Handle cache busting for the Responsive Image Variants by appending an
?mtime=
string to the URL - Better display of image variants when no variants are created
- No longer throws errors if you don't have the an image variant creator installed
- Wrap URLs and data returned to templates with
Template::raw()
so they won't be HTML entity encoded by default
- Added
craft.imageOptimize.createOptimizedImages
to allow for the dynamic creation of Optimized Image variants - Added
craft.imageOptimize.placeholderBox
to create a transparent SVG placeholder box of an arbitrary size and color - Automatically reduce the quality of retina images (controllable via the
lowerQualityRetinaImageVariants
setting inconfig.php
) - Don't create Optimized Image Variants if it means the original image would be up-scaled (controllable via
the
allowUpScaledImageVariants
setting inconfig.php
) - Purge URLs for assets that are deleted from services like Imgix
- Fixed an issue where deleted Optimized Image Variant blocks would cause an error once saved
- Changed the default
optipng
compression to-o3
so the compression time is more reasonable - Updated README.md to reflect the new features
- Fixed an error with Imgix transforms
- Switched from
file_exists()
tois_file()
for detecting image processor and variant commands - Fixed an issue with Optimized Image Variant generation on certain setups
- The OptimizedImages field now displays protocol-relative images properly
- Added better debug logging
- Updated to require craftcms/cms
^3.0.0-RC1
- Fixed an issue where selecting image variants would result in the wrong aspect ratio
- Changed the default image variant widths
- Auto-purge remote Imgix image URLs when assets are changed
- Fixed an issue with newly uploaded assets that have an OptimizedImages field in their Volume Layout
- Added media query srcset sizes for precise control over the output sizes
- Added the display of the dominant color palette and the lazy load placeholder images to the Field
- Optimize the placeholder images regardless of user settings
- Fixed an issue where newly uploaded assets would not resave on the AJAX request
- Added portrait & landscape responsive image variant presets
- Added support for globally replacing native Craft transforms with a service like Imgix, with zero template changes
- Added a Welcome page after installing ImageOptimize
- Performance improvements when generating the placeholders
- Fixed broken OptimizedImages Field settings
- Fixed
optipng
path inconfig.php
- Implemented an abstract
ImageTransform
class & interface
- Added support for using Imgix to create the responsive image transforms
- Switched over to using
ResaveElements
queue to handle newly uploaded Assets - Implemented optimized SVG data URIs, which can shave 15% off of the size of the SVG size
- More paranoid sanity checking of the
activeImageProcessors
andactiveImageVariantCreators
config.php
settings
- Added the ability to control when image variants are created via
generateTransformsBeforePageLoad
config.php
setting - Added a
createColorPalette
inconfig.php
to control dominant color palette creation - Added a
createPlaceholderSilhouettes
inconfig.php
to control silhouette placeholder image creation
- Added the ability to make inline SVG silhouette images as placeholder images for lazing loading
- Moved the default variants to the
config.php
and Settings model, so they can be overridden
- Added the variant setting Enforce Aspect Ratio to allow for images with no fixed aspect ratio
- Added the ability to automatically set the placeholder color to the image's dominant color
- Added the ability to extract the 5 dominant colors from an image
- Added automatic generation of Instagram-style low resolution placeholder images for lazing loading
- Added support for 2x and 3x retina images
- Added a
.src()
method to get the default responsive variant
- Updated the README.md to be more descriptive
- Responsive Image Variants now default to
jpg
as a file format, for client-proofing purposes - Fixed an issue where re-arranging to adding/deleting Responsive Image Variants could cause issues
- Fixed an issue with non-manipulatable images like
PDF
- Fixed an issue that could leave stale image variants around
- Ensure that the optimized image variants are re-created if the image is edited
- Added logging to show the savings for image variants
- Fixed the way the Settings page is rendered
- Updated
README.md
- Added
OptimzedImages
Field - Updated
README.md
- Added support for automatic
webp
image variant creation
- Fixed support for the
mozjpeg
image processor
- Craft 3 beta 20 compatibility
- Fixed the packagist.org package name to coincide with the plugin renaming
- Added debug
trace
logging in the event handler - Updated
README.md
- Renamed the plugin from
ImageOptim
toImageOptimize
- Added
.webp
support
- Added
createSettingsModel()
to the main plugin class
hasSettings
->hasCpSettings
for Craft 3 beta 8 compatibility- Added Craft 3 beta 8 compatible settings
- Modified config service calls for Craft 3 beta 8
- Added code inspection typehinting for the plugin & services
- Removed unused
resources/img
- Added support for
gif
images viagifsicle
- Added
craft/cms
as a composer dependency
- Code refactor/cleanup
- Added logging of the savings for each image optimization if
devMode
is on
- Added
mikehaertl/php-shellcommand
as a dependency incomposer.json
- Updated
README.md
with more information
- Initial release