Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quality config option no longer applies as expected with rosell-dk/webp-convert version 2.6.0 or higher #167

Open
hostep opened this issue Jun 25, 2024 · 0 comments

Comments

@hostep
Copy link

hostep commented Jun 25, 2024

While trying to figure out after a big update of dependencies why quality setting of yireo's webp2 module no longer seems to work, I discovered some things.

Some links:

Currently this yireo webp2 module (at version 0.13.5) uses the options:

  • quality - which is hardcoded set to "auto"
  • max-quality - based on backoffice configuration
  • encoding - based on backoffice configuration
  • convertor - based on backoffice configuration

Problems with these options:

  • quality with setting "auto" is deprecated in the rosell module
  • max-quality is deprecated in the rosell module
  • the quality value from backoffice in yireo's module is no longer taken into account, however the Magento config Advanced > System > Images Upload Configuration > Quality is used instead "by accident" I guess, for jpeg => webp conversion because the new version of the rosell module uses the minimum quality amount between the quality from the jpeg or the "quality" setting defined (so no longer the "max-quality")

Proposal:

  • bump the minimum composer constraint version for rosell-dk/webp-convert to at least ^2.6 or maybe even higher?
  • rework the logic, so that the quality configuration value is now passed on to the "quality" option and not to the "max-quality" option
  • consider adding a config option to set the new "auto-limit" option on or off

It's a bit annoying that rosell-dk/webp-convert released this in version 2.6.0 and not in a new major version 3.0.0 for example, but they added some fallback logic, which "kinda" keeps some kind of backwards compatibility promises, but not entirely...
Also kind of strange nobody else seemed to have noticed this, version 2.6.0 was already released 3 years ago.

This is pretty complicated stuff, I hope I didn't make a mistake in my explanation here and it's a bit clear what I'm trying to say

@hostep hostep changed the title Quality config option no longer apply as expected with rosell-dk/webp-convert version 2.6.0 or higher Quality config option no longer applies as expected with rosell-dk/webp-convert version 2.6.0 or higher Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant