Last modified: 2014-03-10 00:26:31 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 T50519, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48519 - Add basic WebP upload support with JPEG/PNG thumbnails
Add basic WebP upload support with JPEG/PNG thumbnails
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: ---
Assigned To: Bryan Tong Minh
:
Depends on:
Blocks: 25397 multimedia
  Show dependency treegraph
 
Reported: 2013-05-15 20:52 UTC by Brion Vibber
Modified: 2014-03-10 00:26 UTC (History)
8 users (show)

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


Attachments

Description Brion Vibber 2013-05-15 20:52:26 UTC
To support upload of WebP images on Commons (bug 25397) we'll want to do basic JPEG or PNG thumbnail conversion.

In the future this can be fancied up to serve WebP thumbs to supporting browsers, but for the near term this would allow uploading WebP source images and having them be usable on the site.

Probably can convert with ImageMagick... if not can use other tools easily.
Comment 1 Brion Vibber 2013-05-15 20:55:03 UTC
r75087 added file type recognition, not sure if anybody's stuck size fetching or thumbnailing in since...
Comment 2 Brion Vibber 2013-05-16 14:49:28 UTC
This would be simplest using ImageMagick, but note that the standard Ubuntu build of IM doesn't seem to include webp support. Nice.

May have to deal with dependencies... sigh.
Comment 3 Ilya Grigorik 2013-11-07 22:54:35 UTC
FWIW, it seems to work here just fine with standard Ubuntu build?

Setting up imagemagick (8:6.6.9.7-5ubuntu3.2) ...
igrigorik@igrigorik:~$ convert -version
Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

igrigorik@igrigorik:~$ convert bugzilla-logo.png -quality 50 -define webp:lossless=true logo.webp

igrigorik@igrigorik:~$ ls -alh logo.webp
-rw-r----- 1 igrigorik eng 11K Nov  7 14:53 logo.webp
Comment 4 Bryan Tong Minh 2013-11-17 15:45:18 UTC
I have some WebP detection magic.
Comment 5 Gerrit Notification Bot 2013-11-17 16:43:59 UTC
Change 95872 had a related patch set uploaded by btongminh:
(bug 48519) Basic support for WebP

https://gerrit.wikimedia.org/r/95872
Comment 6 Marco 2013-12-06 00:09:33 UTC
What is the behavior when the thumbnail is larger than the image file? Does the webp get delivered without conversion to JPEG?

Example:
# image.webp with resolution 400*300 gets uploaded to Commons
# An en-wiki-user embedds the file with [[image.webp|900px]]
Comment 7 Bawolff (Brian Wolff) 2013-12-06 00:12:28 UTC
(In reply to comment #6)
> What is the behavior when the thumbnail is larger than the image file? Does
> the
> webp get delivered without conversion to JPEG?
> 
> Example:
> # image.webp with resolution 400*300 gets uploaded to Commons
> # An en-wiki-user embedds the file with [[image.webp|900px]]

It should output a jpeg thumbnail that is 400px wide (Never outputting the original file is controlled by the mustRender() method. For webP this is always set to true. Not outputting thumb greater than source width is controlled by isVectorized().)

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


Navigation
Links