Last modified: 2014-09-23 15:50:24 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 T69323, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67323 - HTML embed uses unsuitably large image size
HTML embed uses unsuitably large image size
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
https://en.wikipedia.org/wiki/Coloman...
:
Depends on: 54035
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-30 18:08 UTC by Brion Vibber
Modified: 2014-09-23 15:50 UTC (History)
6 users (show)

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


Attachments
screenshot showing 3000x2078px PNG embed (589.67 KB, image/jpeg)
2014-06-30 18:08 UTC, Brion Vibber
Details
Screenshot of <https://en.wikipedia.org/wiki/State_of_the_Union#mediaviewer/File:Livingood_Obama_State_of_the_Union_2011.jpg>, 2014-09-16 (84.69 KB, image/png)
2014-09-16 23:56 UTC, MZMcBride
Details

Description Brion Vibber 2014-06-30 18:08:37 UTC
Created attachment 15791 [details]
screenshot showing 3000x2078px PNG embed

The HTML embed mode in the 'use' dialog seems to embed the full-resolution original image, which can be unconscionably huge.

See attached screenshot & URL.
Comment 1 Tisza Gergő 2014-06-30 18:32:36 UTC
Well, you have selected "Original size"...
I guess it should not be the default for embedding, though.
Comment 2 Brion Vibber 2014-06-30 18:49:38 UTC
Yes, it's the default... which seems unwise for multi-megapixel images. :)
Comment 3 MZMcBride 2014-09-16 23:36:40 UTC
This is pretty rough on the unsuspecting user.

It's unclear to me why the HTML output is not directly equivalent to the wikitext --> HTML output (i.e., the HTML we provide to users via MediaViewer's embed feature should try to be identical to the HTML we provide to users already via "[[File:Foo.png]]"-type syntax). Currently the two HTML outputs are not directly equivalent.
Comment 4 MZMcBride 2014-09-16 23:55:16 UTC
(In reply to Tisza Gergő from comment #1)
> Well, you have selected "Original size"...

If I go to <https://en.wikipedia.org/wiki/State_of_the_Union#mediaviewer/File:Livingood_Obama_State_of_the_Union_2011.jpg>, click "Use this file", click "Embed", click "HTML", and then select "small 217 x 145 px" from the drop-down menu, the suggested embed HTML is:

---
<p><a href="https://commons.wikimedia.org/wiki/File:Livingood_Obama_State_of_the_Union_2011.jpg#mediaviewer/File:Livingood_Obama_State_of_the_Union_2011.jpg"><img src="https://upload.wikimedia.org/wikipedia/commons/6/65/Livingood_Obama_State_of_the_Union_2011.jpg" alt="Livingood Obama State of the Union 2011.jpg" height="145" width="217"></a><br>"<a href="https://commons.wikimedia.org/wiki/File:Livingood_Obama_State_of_the_Union_2011.jpg#mediaviewer/File:Livingood_Obama_State_of_the_Union_2011.jpg">Livingood Obama State of the Union 2011</a>" by <a href="//commons.wikimedia.org/wiki/Pete_Souza" title="Pete Souza" class="mw-redirect">Pete Souza</a> (<a href="//en.wikipedia.org/wiki/Executive_Office_of_the_President_of_the_United_States" class="extiw" title="w:Executive Office of the President of the United States">Executive Office of the President of the United States</a>) - <a rel="nofollow" class="external free" href="http://www.whitehouse.gov/photos-and-video/photogallery/2011-state-union-address">http://www.whitehouse.gov/photos-and-video/photogallery/2011-state-union-address</a>. Licensed under Public domain via <a href="//commons.wikimedia.org/wiki/">Wikimedia Commons</a>.</p>
---

"<img src="https://upload.wikimedia.org/wikipedia/commons/6/65/Livingood_Obama_State_of_the_Union_2011.jpg" alt="Livingood Obama State of the Union 2011.jpg" height="145" width="217">" is pretty clearly wrong. You're embedding the full-size image and resizing it in-browser. This is a major bug.
Comment 6 MZMcBride 2014-09-16 23:57:20 UTC
(In reply to MZMcBride from comment #5)
> Created attachment 16492 [details]
> Screenshot of
> <https://en.wikipedia.org/wiki/State_of_the_Union#mediaviewer/File:Livingood_Obama_State_of_the_Union_2011.jpg>, 2014-09-16

I'm well aware that the drop-down menu says "Original file <span garbage>", but it's clearly having issues (I'll file further bug reports) and the HTML markup makes it clear that the small option has been selected by the user.
Comment 7 Tisza Gergő 2014-09-23 15:50:24 UTC
Currently we fetch thumbnail URLs when the user first selects the given file/size combination, which comes with a lot of quirks (such as the embed text appearing seconds later than the menu select action). For a decent fix, we would want multi-size support in imageinfo.

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


Navigation
Links