Option to select format and compression degree for thumbnails

Now that AVIF is available in the forum, I thought it would be great to be able to select that format for the thumnails that the forum generates from the provided images.

It would be great to be able to select avif for the photos that are uploaded and need compression due to exceeding forum stablished limits.

AVIF is a great format that shines when you need strong compression.
Main web browsers and mobile browsers support it (the only exception being MS Edge, but it seems next stable release will provide it).
For the forums that are conservative and need to work with old browsers, giving the option to select jpeg as compression would be great.

In my opinion, by default, the forum should maintain the original jpeg format, but give the admins the option to select jpeg of avif for all thumbnails and converted images.

A parameter to be able to control the degree of compressio for the authomatic conversion would be greatly wellcome.

If it where able to detect when a browser does not support AVIF and serve a jpeg image on the fly it would be great, but that is not an easy task, and may be not the philosphy of the developers.

I take this opportunity to congratulate the developers for implementing avif support, I have tested it and it works very well.

3 Likes

Resolution matters too, not just compression.

In Topic List Previews Theme Component you can select the resolution of the image shown on the interface:

The theme component asks core to create a set of thumbnails at different resolutions and this setting allows you to influence which set is shown.

2 Likes

How to set Discourse to automatically convert uploaded images (png, jpg) to avif format?

I presume Discourse uses Imagemagick in the backend for this? then it shouldn’t be too difficult to tweak the compression settings for Imagemagick to make it output avif?

I tried checking if S3 services such as Blackblaze offer compression on their end, but it seems this is something that has to be done by Discourse itself.

@avidseeker I merged your other Support topic into this one, since they are directly related. What you are asking for is not currently supported in Discourse as far as I know, but it’s worth talking about the merits of adding it is worth doing here in this Feature topic.