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

added AVIF support #198

Merged
merged 2 commits into from
Jul 22, 2023
Merged

added AVIF support #198

merged 2 commits into from
Jul 22, 2023

Conversation

0xb4lint
Copy link
Contributor

  • changed the example images optimisation methodology to a reproducible one with Spatie\Image + GD
  • added AVIF support with avifenc
  • currently avifenc doesn't support .avif input files, avifdec used to generate temp PNG file
  • introduced tmpPath to BaseOptimizer, tmpPath is deleted after command has ran
  • added AVIF test
  • supporting older PHP versions (which are not detecting image/avif MIME) with .avif extension check
  • researched the different AVIF parameters and set the default value to 23 to have a very low DSSIM score (0.00163751) similar to JPG (0.00052061) and WEBP (0.00166036)

@freekmurze
Copy link
Member

This is a high quality PR! Thank you!

@freekmurze freekmurze merged commit 9551e2d into spatie:main Jul 22, 2023
9 checks passed
@freekmurze
Copy link
Member

Thanks!

@0xb4lint
Copy link
Contributor Author

Thank you! I'll create a PR to spatie/laravel-medialibrary with the new Avifenc optimizer. 😉

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

Successfully merging this pull request may close these issues.

2 participants