Add option for progressive image output
https://core.trac.wordpress.org/changeset/57607
Vips supports it, but this needs to be carefully implemented as it throws an error if providing the progressive option for a format that doesn't support it.
Question: One general option in the modal or one for each format (like quality)?
I would like to enable it only for jpgs for example, and I think doing like "one for each format" is preferable to give users more granularity in the choice of the preferred encoding method
There's gonna be so many options eventually 😄
you are right but progressive jpg are preferable while a progressive png can size the 20% more than the "standard" one (and that's why I would avoid enabling it for pngs)
Implementation notes for myself:
Add a hardcoded map with available options per format with types and everything (schema?). Then loop through them according to the chosen output format.
Setting key might be confusing, e.g. if jpeg_outputFormat is AVIF, then AVIF quality would be under jpeg_quality? Or better jpeg_avif_quality? Do we delete stale preferences after changing formats?
Quality input & progressive toggle could be displayed side by side with 50% width using flexbox in order to save space.
There might be more preferences in the future though, so some toggle might be useful to show/hide advanced settings
From https://github.com/swissspidy/media-experiments/issues/347#issuecomment-2139645667:
Aside: this is missing a "default image quality" input
New layout:
Useful testing tool: https://google.github.io/attention-center/