Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avif support #275

Closed
WeAreHaus opened this issue Mar 18, 2021 · 3 comments
Closed

Avif support #275

WeAreHaus opened this issue Mar 18, 2021 · 3 comments
Labels

Comments

@WeAreHaus
Copy link

WeAreHaus commented Mar 18, 2021

I'm getting "Internal Server error" when trying to convert larger images to avif format.
I can understand that the memory might hit the roof at some point, but then I found this in my Lambda logg saying avif is not among the supported filetypes.. Is that just a text update missing or is it not yet fully supported? The Sharp.js library has avif as an output format, so I was counting on it to work.

2021-03-18T07:15:48.654Z	7031ea41-23f3-45ee-b01e-b10b90d39bc3	ERROR	{
  status: 400,
  code: 'RequestTypeError',
  message: 'The type of request you are making could not be processed. Please ensure that your original image is of a supported file type (jpg, png, tiff, webp, svg) and that your image request is provided in the correct syntax. Refer to the documentation for additional guidance on forming image requests.'
}

It works when I convert smaller images like 800x800px but when trying to do 1600x1600 it returns with "Internal server error"
The same operation works fine for larger images with the webp format, so I'm not sure if avif conversion takes alot more memory or if there is something else going on.

Is there anything more I can do about it?

@WeAreHaus WeAreHaus added the bug label Mar 18, 2021
@simon-cordts
Copy link

Sorry, I realized that the message was for original image input. But still, the avif conversion is really slow compared to other formats. Can I do anything about that?

@G-Lenz
Copy link
Contributor

G-Lenz commented Mar 31, 2021

Hi @simon-cordts , sorry for the late response. Unfortunately, avif conversion is slow, and also can be resource intensive. This is an issue with the sharp library and with avif conversion in general compared to other formats. The sharp library appears to currently be looking into improving the performance.
lovell/sharp#2597
One option you can try is adding the speed option for avif, this can speed up the conversion, but will also increase CPU and Memory consumption.
https://sharp.pixelplumbing.com/api-output#avif

@WeAreHaus
Copy link
Author

Ok thanks, I'll follow the progress from there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants