11ty / eleventy-img

Utility to perform build-time image transformations.
https://www.11ty.dev/docs/plugins/image/
433 stars 53 forks source link

Change AVIF quality defaults #198

Closed zachleat closed 4 months ago

zachleat commented 7 months ago

Read: https://tsev.dev/posts/2023-11-10-should-avif-be-the-dominant-image-format/

As we discovered, AVIF often is more accurate and smaller in file size than competing image formats. A quality setting of 60-70% is a good place to start where perceivable accuracy is consistent enough across images without exploding in file size. At the cost of accuracy, we can lower it to 50%, but anything lower typically comes with bad artefacts. I recommend staying below 80% as any value higher is indistinguishable. If you care about improved pixel accuracy, JPEG might give you that at a smaller file size.

zachleat commented 4 months ago

I did find out later that the Sharp library we use upstream has a default quality of 50 so I think we can close this one as solved.

https://sharp.pixelplumbing.com/api-output#avif