modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
888 stars 156 forks source link

use AVIF as the default image format instead of JPEG #2416

Open Thinkseal opened 6 days ago

Thinkseal commented 6 days ago

Please confirm the following.

What parts of Modrinth is your feature request related too?

App, Website

Is your suggested feature related to a problem? Please describe.

It was recently pointed out to me that images on modrinth are being compressed into .jpegs and personally, I can notice the compression loss in quality from them

Describe the solution you'd like

.AVIF files I believe it would be beneficial to have it compressed to those as well and use that as the main file and then the JPEG is the back up if your browser is very outdated and doesn't support .AVIF files because from my testing, they take up less space while being higher quality and work, even if you don't have hardware support for AV1 decoding.

Describe alternatives you've considered

Some alternatives I have considered is JPEG XL but that is not supported on chrome and has slightly bigger files as its output for similar quality, not having an AVIF Version of the file making the compression artifacts more noticeable (how they are right now) which would be annoying on higher resolution displays

Additional context

AVIF is a file format that uses the same technology and AV1 video encoding and decoding to make image files extremely compressed while keeping keeping a very usable quality JPEG XL is basically like a better version of JPEG files and is slightly bigger than AVIF files but makes it so that important parts of the image load first and you don't need to fully download the image to view it, although it is much less supported

Prospector commented 6 days ago

1) we don't use JPEG, we use WebP 2) AVIF does not have enough browser support

Thinkseal commented 6 days ago

oh I didn't know because when I looked at the extensions for images it said .jpeg also for the second I think that you can set it to show the .webp file if the users browser doesn't support avif although I don't know how hard that is to implement