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

Generate WEBP previews for WEBP files (or at least as JPG) #314

Closed
VeederLicht opened this issue Sep 30, 2022 · 6 comments
Closed

Generate WEBP previews for WEBP files (or at least as JPG) #314

VeederLicht opened this issue Sep 30, 2022 · 6 comments

Comments

@VeederLicht
Copy link

I cant believe i'm having to create an issue for this in 2022, but here we go:

Also see nextcloud/viewer#1315

Currently for WEBP files, the viewer generates PNG files (who thought that was a good idea?). Resulting in 3~4 MB PNG files where the WEBP original files are a few 100 KB. This is obviously not desired, to put it mildly. I have folders filled with WEBP files, resulting in a '90's style excruciating slow browsing experience because of this.

Desired behaviour: Fully support WEBP formats by creating previews of the same format.

Info: WEBP and WEBM formats were specifically introduced over a decade ago to replace archaic formats like PNG, BMP, JPG, AVI and MPEG.

@st3iny
Copy link
Member

st3iny commented Oct 1, 2022

The previews themselves are generated by the server. Unfortunately, I have no influence over the logic itself. My app just triggers the generation process.

Please have a look at nextcloud/server#13552 for the feature request.

@st3iny st3iny closed this as completed Oct 1, 2022
@VeederLicht
Copy link
Author

VeederLicht commented Oct 1, 2022

Are you kidding me? Even if generating WEBP previews is not supported by the software you are using, then at least disable preview generation for that format and serve the raw WEBP files. The current 'solution' serves 'preivew' PNG files that are 6-10x the size of the original, i cant believe how stupendous this is!

@st3iny
Copy link
Member

st3iny commented Oct 1, 2022

I totally agree, that the preview generation is suboptimal in some cases. In the end this is a matter of priorities. Please remember that you can't expect us to implement features for free.

Contributions in this area are always welcome. Feel free to open a PR if you are experienced in this area.

@VeederLicht
Copy link
Author

Sure. Is that preview-generating library also opensource? If so, can you link to it?

@VeederLicht
Copy link
Author

I mean, the PreviewGenerator method implements the IPreview interface, but the actual implementation seems to be passed as a parameter. Which function is responsible for calling this class and passing the actual implementation? I will find my way from there.

@st3iny
Copy link
Member

st3iny commented Dec 2, 2022

Take a look at:

The class \OC\Preview\Generator is located in https://github.com/nextcloud/server/blob/048fdabca905746c542cabefc5c0b4684819fdf3/lib/private/Preview/Generator.php.

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

No branches or pull requests

2 participants