aem-core-wcm-components
aem-core-wcm-components copied to clipboard
AdaptiveImage: Configurability of when to apply transformation by file type
Feature Request
Whether the AdaptiveImage
delivers the original or applies transformations is fixed: svgs and gifs are never transformed, other images are only transformed if there is a transformation applied (e.g. rotation, cropping, flipping). As the transformation also includes compression for jpg images which is defined system-wide, we have editors cropping images by one pixel just to make sure the compression is applied - and frequently it is overlooked, causing large image downloads impacting green web policies and site performance (CoreWebVitals affected).
It would be great to allow configuring the transformation more closely via OSGi settings: defining which image types are always transformed and which are never transformed. This would allow preventing transformation in other formats (e.g. optimized webp rendition already available, should be delivered as is). Additionally, if one sets up compression for jpegs, one could force the transformation process (incl. compression) of all jpegs even if no manual transformation is defined.
An alternative would be to include compression in the delivery of any jpg, but that would leave less flexibility to individual projects and would impact existing solutions.