Last modified: 2013-11-07 22:57:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27397, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25397 - Add .webp to the list of accepted file types on Wikimedia Commons uploads
Add .webp to the list of accepted file types on Wikimedia Commons uploads
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
unspecified
All All
: Lowest enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://code.google.com/speed/webp/ind...
:
Depends on: 48519
Blocks: 25611
  Show dependency treegraph
 
Reported: 2010-10-03 07:42 UTC by Mathias Schindler
Modified: 2013-11-07 22:57 UTC (History)
17 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Example webp file (8.23 KB, image/webp)
2010-10-20 14:30 UTC, Derk-Jan Hartman
Details
webp test file (152.28 KB, image/webp)
2010-10-20 14:31 UTC, Mathias Schindler
Details

Description Mathias Schindler 2010-10-03 07:42:39 UTC
As a related project to the VP8/Webm video codec, Google has released an early version WebP (goo.gl/VmXd), of a lossy image compression that claims to have better compression results than JPEG (goo.gl/7an8). 

There is no patent incumberance of this file format.

Google has also announced to add WebP support to its Chrome Browser and to submit a patch to the Webkit rendering engine. The relationship of WebP and WebM means that a browser already using libvpx for the video display will have little problems adding support to the webp images and support for webp by Firefox and Opera is likely.

.webp should be added to the permitted file extensions for Wikimedia Commons uploads, even if right now webp files should not be included for example for the illustration of Wikipedia articles.
Comment 1 MZMcBride 2010-10-03 07:56:35 UTC
I think there's a reasonable expectation that a file on Commons be usable on Wikimedia wikis. If you allow WebP uploads and a user tries to reasonably insert the file into a page, it should convert it to PNG (similar to SVG) or some other format in the (likely) event that the user's browser does not support WebP. Similarly, I think there's a reasonable expectation that users be able to easily preview uploads of this nature (in the upload log, file description page, Special pages, etc.).

Until there's a converter in place or some sort of graceful fallback, I don't think WebP should be allowed.
Comment 2 Mathias Schindler 2010-10-03 08:09:25 UTC
MZMcBride: You are correct that this is a reasonable expectation and there are a number of files where direct browser support does not exist or is not fully available, including

DJVU http://commons.wikimedia.org/wiki/File:Alice_in_Wonderland.djvu
TIFF http://commons.wikimedia.org/w/index.php?title=File:South_African_President_Zuma.TIF&page=1
PDF http://commons.wikimedia.org/wiki/File:Gitmo-sop.pdf

If I understand the chronology correct, uploading of these files was permitted before fallback mechanisms existed to allow the kind of convenient embedding into other Wikimedia pages.

And yes, subsequent steps after allowing webp files were tools to display a jpeg preview for those browsers who do not understand webp.
Comment 3 Max Semenik 2010-10-03 08:26:32 UTC
The purposes of DjVu/TIFF and WebP are completely different: the former are used as multipage containers with book scans for Wikisource, while the latter is a format intended for general replacement for PNG due to its better compression. Therefore, uploading WebP files just to convert them to PNG due to lack of browser support makes no sense, PNG would serve just fine. Let's revisit this in a couple of years when browser support for this format will be more widespread (or it will fail and we wouldn't need to bother with it at all).
Comment 4 Gurch 2010-10-03 10:12:05 UTC
(In reply to comment #3)
> while the latter
> is a format intended for general replacement for PNG due to its better
> compression.

Just to avoid any confusion: WebP compression is lossy (it's based on a video codec) and is intended as a replacement for JPEG, not PNG.
Comment 5 p858snake 2010-10-03 10:16:23 UTC
We should probably do it for more than just commons (eg: as a default), re-gigging the component/product as such.
Comment 6 Mathias Schindler 2010-10-20 09:05:34 UTC
There is a patch for libgd with WebP support:

http://svn.php.net/viewvc?view=revision&revision=304041 (http://www.php.net/~pierre/gd_webp_take1.txt respectively)
Comment 7 Derk-Jan Hartman 2010-10-20 14:27:44 UTC
Anyone know an example file for this btw ?

Adding basic upload support shouldn't be too hard and can't hurt. Embedding is something else, I don't think this should be enabled for a long while, and converting to png doesn't really sound like a good idea for the immediate future either.
Comment 8 Derk-Jan Hartman 2010-10-20 14:30:52 UTC
Created attachment 7743 [details]
Example webp file

The image is from the JS lib weppy. http://github.com/antimatter15/weppy/blob/master/tinybrot.webp
Comment 9 Mathias Schindler 2010-10-20 14:31:30 UTC
Created attachment 7744 [details]
webp test file

This is a test image in the webp file format. The image is licensed as cc-by-sa. I am the creator of the image. A jpeg version for comparison can be found at http://commons.wikimedia.org/wiki/File:Netzregeln10-Volker-Beck.jpg
Comment 10 Derk-Jan Hartman 2010-10-20 14:52:17 UTC
Basic support to allow uploading of WebP is added in r75087
Comment 11 Brion Vibber 2010-10-22 00:46:46 UTC
Short-term I'd recommend doing webp->jpeg conversion for inline viewing; it should be pretty straightforward to do.

Longer term, being able to produce optimized WebP thumbnails from JPEG sources as well could be advantageous (though this may require a magical future where caching issues with type negotiation are dealt with to deploy on Wikimedia!)
Comment 12 Andre Klapper 2012-12-15 11:07:39 UTC
(In reply to comment #3)
> Let's revisit this in a couple of years when browser support for this 
> format will be more widespread.

At least Safari, Firefox and IE do not support WebP natively. Still reopening this ticket to get rid of deprecated LATER resolution.
Comment 13 Mathias Schindler 2012-12-15 12:16:56 UTC
There are multiple workarounds for these browsers. The best option is to not serve webp files to these browsers but JPEG or PNGs instead. MediaWiki does the same when serving TeX files in various formats.
Comment 14 Brion Vibber 2013-05-15 20:55:46 UTC
(In reply to comment #11)
> Short-term I'd recommend doing webp->jpeg conversion for inline viewing; it
> should be pretty straightforward to do.

Broke this out to bug 48519.

> Longer term, being able to produce optimized WebP thumbnails from JPEG
> sources
> as well could be advantageous (though this may require a magical future where
> caching issues with type negotiation are dealt with to deploy on Wikimedia!)

That's been broken out as bug 25611 some while ago.
Comment 15 Ilya Grigorik 2013-11-07 22:57:11 UTC
(In reply to comment #13)
> There are multiple workarounds for these browsers. The best option is to not
> serve webp files to these browsers but JPEG or PNGs instead. MediaWiki does
> the same when serving TeX files in various formats.

Chrome and Opera both advertise WebP support via their Accept headers. Combination of that + Vary: Accept should do the trick.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links