Page MenuHomePhabricator

MediaViewer is unavailable for WebP originals
Closed, ResolvedPublicFeature

Description

Hello!

Would it be possible to add support for WebP files in MediaViewer? Since Google has made it open source, I guess that makes it easier, even though I am no expert in the matter. https://developers.google.com/speed/webp/ and perhaps also https://developers.google.com/speed/webp/docs/api should be of help I think. Thanks!

Event Timeline

@Reedy It seems as both those tasks regard PNG or JPEG files getting WebP thumbnails. What I want is that the Media Viewer works for files that are uploaded in the image/webp file format, which not is the case currently.

It was more for cross linking purposes of related tasks. I wasn't saying "this is a duplicate".

To add "WebP support" to MediaViewer requires adding WebP support to MediaWiki first, in terms of uploading etc, which those tasks would likely do some of that prep work for it.

Aklapper changed the subtype of this task from "Task" to "Feature Request".May 7 2021, 7:32 AM

@Reedy

It was more for cross linking purposes of related tasks. I wasn't saying "this is a duplicate".

Oh, my bad

To add "WebP support" to MediaViewer requires adding WebP support to MediaWiki first, in terms of uploading etc, which those tasks would likely do some of that prep work for it.

Well, https://en.wikipedia.org/wiki/Special:Search/file:_local:_filemime:image/webp and https://commons.wikimedia.org/wiki/Special:Search/filemime:image/webp already has bunches of results so I guess what you're asking for already has been added?

I can't say I'd seen it been used in the wild. But the fact numerous other tasks exist, shows there's various holes to be plugged too. See also T282453: Allow to render WebP thumbnails in addition to PNG/JPG in MediaWiki core

Currently, WMF has implemented some WebP thumbnailing support for images on their infrastructure, at the server level, without modifications to MediaWiki: T27611: Support optimized WebP thumbnails as alternative to JPEG, PNG

@Reedy Okay, so basically how they've solved it now, is by using png/jpeg to show the thumbnail, eventhough the file itself is a WebP? If so, can't the same workaround be done with MediaViewer?

Are you asking about:

  • converting to WebP: using WebP as optimised thumbnail format for other (not-WebP) files. E.g. you upload File:Example.PNG to the wiki, and the preview in Mediaviewer will render a scaled-down version in the WebP-format for supported browsers, and in the same PNG-format otherwise.
  • converting from WebP: accept WebP for user-uploaded original files, such as File:Example.webp, and then they will render in some way (doesn't matter what format internally) for page thumbnails and in Mediaviewer.

@Krinkle

converting from WebP: accept WebP for user-uploaded original files, such as File:Example.webp, and then they will render in some way (doesn't matter what format internally) for page thumbnails and in Mediaviewer.

Well, as I've already said, the engine does accept user-uploaded original files, such as File:Example.webp, see https://en.wikipedia.org/wiki/Special:Search/file:_local:_filemime:image/webp and https://commons.wikimedia.org/wiki/Special:Search/filemime:image/webp. The thumbnails are shown as well. The only thing that doesn't seem to be working is FileViewer, and it is this that I am asking about. Thanks for your reply.

Gilles renamed this task from Add support for WebP files to MediaViewer is unavailable for WebP originals.May 20 2021, 9:47 AM

@Gilles Okay, how does one go about when one wants to do that?

@Aklapper Thanks for your reply but I can't code lol. Is there a place you instead can request it be added by someone?

@Jonteemil: Any place that you can find with a bunch of technical people who have spare time, basically...

Aklapper triaged this task as Low priority.Jul 14 2022, 9:51 AM

Change 875900 had a related patch set uploaded (by Alistair3149; author: Alistair3149):

[mediawiki/extensions/MultimediaViewer@master] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875900

Change 875900 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@master] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875900

Change 875916 had a related patch set uploaded (by Alistair3149; author: Alistair3149):

[mediawiki/extensions/MultimediaViewer@REL1_39] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875916

Change 875917 had a related patch set uploaded (by Alistair3149; author: Alistair3149):

[mediawiki/extensions/MultimediaViewer@REL1_38] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875917

Change 875918 had a related patch set uploaded (by Alistair3149; author: Alistair3149):

[mediawiki/extensions/MultimediaViewer@REL1_37] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875918

Change 875919 had a related patch set uploaded (by Alistair3149; author: Alistair3149):

[mediawiki/extensions/MultimediaViewer@REL1_36] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875919

Change 875920 had a related patch set uploaded (by Alistair3149; author: Alistair3149):

[mediawiki/extensions/MultimediaViewer@REL1_35] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875920

Change 875919 abandoned by Umherirrender:

[mediawiki/extensions/MultimediaViewer@REL1_36] Allow WebP to be previewed in viewer

Reason:

Branch is EOL, no more backports

https://gerrit.wikimedia.org/r/875919

Change 875918 abandoned by Umherirrender:

[mediawiki/extensions/MultimediaViewer@REL1_37] Allow WebP to be previewed in viewer

Reason:

Branch is EOL, no more backports

https://gerrit.wikimedia.org/r/875918

All patches are now merged.

Change 875917 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@REL1_38] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875917

Change 875916 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@REL1_39] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875916

Change 875920 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@REL1_35] Allow WebP to be previewed in viewer

https://gerrit.wikimedia.org/r/875920