serverless-image-handler icon indicating copy to clipboard operation
serverless-image-handler copied to clipboard

Add support for AVIF image types

Open Furytron opened this issue 2 years ago • 12 comments

Is your feature request related to a problem? Please describe. Could the AVIF image file mimetype be supported?

https://en.wikipedia.org/wiki/AVIF

Describe the feature you'd like Allow images with the AVIF extension to be used in legacy Thumbor style URLs

Furytron avatar Apr 06 '22 09:04 Furytron

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Oct 04 '22 00:10 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as closing-soon.

github-actions[bot] avatar Oct 12 '22 00:10 github-actions[bot]

Reopen issue please.

Furytron avatar Nov 10 '22 16:11 Furytron

We will add an evaluation of this to our backlog

dougtoppin avatar Nov 10 '22 20:11 dougtoppin

this is a major improvement! please develop!

devesch avatar Nov 23 '22 20:11 devesch

hi @dougtoppin is there any estimate on this?

would be a major improvement on our websites.

devesch avatar Nov 25 '22 17:11 devesch

@devesch We are looking at supporting AVIF now and will get back to you, tks for the suggestion

dougtoppin avatar Nov 28 '22 21:11 dougtoppin

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Feb 27 '23 00:02 github-actions[bot]

AVIF support would be great especially now that it's supported in most major browsers, desktop and mobile.

adrienpicard avatar Apr 06 '23 08:04 adrienpicard

Any news on this guys?

devesch avatar May 05 '23 14:05 devesch

Any updates @dougtoppin? Issue has been open for over a year.

michtio avatar Jul 04 '23 09:07 michtio

The issue has been added to our backlog, and planned for the future releases.

dorrikh avatar Oct 11 '23 18:10 dorrikh

We would also very much appreciate it if the AVIF support were available soon. Maybe something similar to the AUTO_WEBP Lambda option.

marco910 avatar May 16 '24 09:05 marco910

@dorrikh any update on this one? I see it's been added to the backlog but do you expect it to be released any time soon?

davelarkan avatar Jun 17 '24 10:06 davelarkan

Hi @davelarkan, @marco910 et al, We've implemented this internally, you should see the functionality alongside the next major/minor release. One thing to note is that only avif images with a bit depth of 8 will be supported, as Sharp (and their underlying image processing library libvips) don't support 10 and 12 bit depth avif images. You can read more about that here.

Thanks for your contributions to SIH, Simon

simonkrol avatar Jun 20 '24 16:06 simonkrol

@simonkrol Great news! Happy to test this out in production.

Do I have to manually request an AVIF image or is this handled automatically like with WebP?

marco910 avatar Jun 20 '24 16:06 marco910

@simonkrol happy to hear it! Could you confirm it'll work with "thumbor" style url rules too?

davelarkan avatar Jun 20 '24 16:06 davelarkan

@marco910 Images would need to be manually requested to be converted to AVIF. One thing to keep in mind is that AVIF image compression is quite slow, so converting to images may not be viable for medium sized images. I noticed issues with timing out on conversions for images around 1MB.

@davelarkan Yes, you will be able to use AVIF images as the source image and when converting to AVIF for both Thumbor-style and base64 encoded requests. Though I believe b64 currently allows AVIF images so long as the ContentType is set to "image/avif" in S3 (I imagine this would also work with Thumbor-style requests so long as ContentType is set and the key doesn't include a file extension).

simonkrol avatar Jun 20 '24 16:06 simonkrol

Type inference support included in v6.2.6

simonkrol avatar Jun 27 '24 20:06 simonkrol