enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
203 stars 34 forks source link

Progressive images support #10642

Closed rymsha closed 2 months ago

rymsha commented 2 months ago

XP Image should support progressive image conversion by leveraging ImageWriteParam.setProgressiveMode

Configure globally com.enonic.xp.image.cfg progressive = jpeg,png,gif Don't provide url configuration parameter (at least for now) Enable progressive by default for jpeg, disable for png and gif by default progressive = jpeg

rymsha commented 2 months ago

progressive JPEGs are small (often smaller) in size! (but for GIF and PNG opposite is true ) progressive JPEG use just a bit extra CPU on clients developers often use blur placeholder on missing feature of progressive webp - as an alternative for progressive jpeg for good-old tag without javascript (when your site is not headless) there is no good blur placeholder solution ( is deprecated)

rymsha commented 2 months ago

There is a lot of debate if progressive images are good or bad. So we make this feature configurable.

rymsha commented 2 months ago

Documentation note: it is not sufficient to turn on/off the progressive parameter. Image cache must be cleared manually.