Skip to content

Comments

fix: remove avif fallback banners#4584

Open
wescopeland wants to merge 1 commit intoRetroAchievements:masterfrom
wescopeland:banner-res-fix
Open

fix: remove avif fallback banners#4584
wescopeland wants to merge 1 commit intoRetroAchievements:masterfrom
wescopeland:banner-res-fix

Conversation

@wescopeland
Copy link
Member

Resolves https://discord.com/channels/310192285306454017/758865736072167474/1474516509563949097.

It turns out AVIF is probably the least optimal compression algorithm for the specific image used as our banner fallback.

Uncompressed Source
Screenshot 2026-02-21 at 8 33 13 AM

WebP
Screenshot 2026-02-21 at 8 33 20 AM

AVIF
Screenshot 2026-02-21 at 8 33 25 AM

AVIF is good at compressing photos (ie: most conventional banners), but is not good at compressing this sort of fine detail spread all over a single continuous image.

This PR makes several changes:

  • Swaps image generation from using Spatie\Image\Image to using raw Imagick. On my local, I accidentally generated fallbacks using the GD driver, which compresses significantly worse than Imagick.
  • Drops the AVIF fallbacks entirely in favor of WebP.

@wescopeland wescopeland requested a review from a team February 21, 2026 13:36
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of shoving WebP files into fields clearly labeled as AVIF, but I couldn't think of a better idea that also didn't involve a lot of pain over something that's probably superficial.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some way to just get the code to prefer the webp over the avif? why are both needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some way to just get the code to prefer the webp over the avif? why are both needed?

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