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 #3320

Merged
merged 3 commits into from
Jul 24, 2023
Merged

added AVIF support #3320

merged 3 commits into from
Jul 24, 2023

Conversation

0xb4lint
Copy link
Contributor

@0xb4lint
Copy link
Contributor Author

@freekmurze is there anything I can do with the prefer-lowest tests?

@freekmurze
Copy link
Member

Try requiring the latest version of the image package in composer.json. That should fix the tests

@0xb4lint
Copy link
Contributor Author

In the spatie/image package there's a "spatie/image-optimizer": "^1.1" dependency defined.

Should I create a PR in spatie/image changing the spatie/image-optimizer dependency version to ^1.7 and after the merge and release (like 2.3.0), increasing this repository's spatie/image dependency to ^2.3?

@freekmurze freekmurze merged commit 83e902e into spatie:main Jul 24, 2023
11 checks passed
@freekmurze
Copy link
Member

I quickly took care of this myself thanks!

@ariaieboy
Copy link
Contributor

Thank you so much for this PR @0xb4lint
I have a quick question for you did you test this new optimizer method in production?
because I've been using Avif format for a while with spatie media library but the generated avif format was much bigger than Webp and sometimes bigger than the source image.
Is the generated avif files smaller than webp files?

@0xb4lint
Copy link
Contributor Author

I've noticed the same, that's why I made the AVIF optimizer first: spatie/image-optimizer#198
Based on my research in this topic: https://github.com/feat-agency/avif

The main problem with the large file size coming from the Intervention Image's default 90 quality setting, which results a much higher AVIF than WEBP.

So either you decrease the AVIF conversion quality or use the AVIF optimizer, which will convert to a lot smaller file, while respecting the DSSIM value I've researched.

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.

3 participants