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

[Feature Request] Enable support for avif #192

Closed
SagsMug opened this issue May 4, 2021 · 6 comments · Fixed by #225 or #232
Closed

[Feature Request] Enable support for avif #192

SagsMug opened this issue May 4, 2021 · 6 comments · Fixed by #225 or #232
Labels
enhancement New feature or request

Comments

@SagsMug
Copy link

SagsMug commented May 4, 2021

Is your feature request related to a problem? Please describe.
As more browsers are getting native support for avif, it would be nice to also have mango support this format.
It's supported by Firefox, Chrome, and Opera.
It's not supported by Safari and Edge.

Describe the solution you'd like
Add image/avif to the list of supported image formats

Describe a small use-case for this feature request
If you are working with higher quality images, the size reduction from jpeg can be dramatic, so it would be beneficial for bandwidth and disk space savings.

Additional context
I also don't see why image/gif isn't supported, this is an ancient format supported by practically all browsers.
https://caniuse.com/avif

@SagsMug SagsMug added the enhancement New feature or request label May 4, 2021
@Nerothos
Copy link

Nerothos commented May 4, 2021

Can't avif be stored in a cbz?

@SagsMug
Copy link
Author

SagsMug commented May 4, 2021

Anything can be stored in a cbz format since its a zip file, but Mango has a hardcoded SUPPORTED_IMG_TYPES which specifies image formats Mango will recognize, and avif isn't in there.
So if you have a cbz file with avif images it won't show up in Mango because it's seen as empty.

@hkalexling
Copy link
Member

Yes you are right. I guess there's no harm in supporting more image formats 👍

@Leeingnyo
Copy link
Member

So, do we allow files whose mime type is image/*?

@hkalexling
Copy link
Member

@Leeingnyo Yes I think we can do that. One potential issue is that, if the first page of an entry has a type not supported by image_size.cr, Mango would fail to generate the thumbnail. But this won't break anything and Mango would just serve the original file instead.

@hkalexling hkalexling linked a pull request Sep 6, 2021 that will close this issue
hkalexling added a commit that referenced this issue Sep 7, 2021
hkalexling added a commit that referenced this issue Sep 8, 2021
@hkalexling hkalexling mentioned this issue Sep 18, 2021
@mango-assistant
Copy link

Hi there! The feature has been added in v0.24.0. Thanks for the feature request!

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

Successfully merging a pull request may close this issue.

4 participants