Last modified: 2013-11-07 22:57:11 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.
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.
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.
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).
(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.
We should probably do it for more than just commons (eg: as a default), re-gigging the component/product as such.
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)
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.
Created attachment 7743 [details] Example webp file The image is from the JS lib weppy. http://github.com/antimatter15/weppy/blob/master/tinybrot.webp
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
Basic support to allow uploading of WebP is added in r75087
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!)
(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.
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.
(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.
(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.