Skip to content

[Feature Request] next gen image previews #16629

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

Open
G2G2G2G opened this issue Aug 5, 2021 · 3 comments
Open

[Feature Request] next gen image previews #16629

G2G2G2G opened this issue Aug 5, 2021 · 3 comments
Labels
type/enhancement An improvement of existing functionality

Comments

@G2G2G2G
Copy link

G2G2G2G commented Aug 5, 2021

I don't see any mention of them so throwing it out there since browser support is coming faster than any other formats that ever existed.
When you view a jxl or avif it currently says: Binary file not shown.
For now a setting in the app.ini file would make sense I guess to allow them to be previews for whoever has it enabled.

All major browsers can now be enabled / already ship with it enabled.
Jpeg XL thumbs (.jxl)
Mime type: image/jxl
https://caniuse.com/jpegxl

AVIF (AV1's image from the Alliance for Open Media)
Mime type: image/avif
https://caniuse.com/avif

@noerw noerw added the type/enhancement An improvement of existing functionality label Aug 23, 2021
@noerw
Copy link
Member

noerw commented Aug 23, 2021

This probably won't be fixed in upstream dependencies as we use a patched version of https://pkg.go.dev/net/http#DetectContentType, which only implements an unmaintained spec.

Scratch that, it should be supported in upcoming go 1.17

Scratch that too, this detection is based on file extension, which we currently ignore.

Here's some go code that (incorrectly) adds avif support: gabriel-vasile/mimetype#160
Maybe we could just use that lib

@G2G2G2G
Copy link
Author

G2G2G2G commented Aug 31, 2021

You're opening each file to read it's type for how you treat in the browser?

animated.avif: ISO Media, AVIF Image Sequence

still.avif: ISO Media, AVIF Image

@KN4CK3R
Copy link
Member

KN4CK3R commented Nov 23, 2021

AVIF support was added in gabriel-vasile/mimetype#210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants