Last modified: 2014-05-29 20:11:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10809 - Safe, simple <img> wrapper (for external images)
Safe, simple <img> wrapper (for external images)
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Extensions requests (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-06 00:32 UTC by Eep²
Modified: 2014-05-29 20:11 UTC (History)
4 users (show)

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


Attachments

Description Eep² 2007-08-06 00:32:55 UTC
* Allow full <img> HTML tag attributes for "alt="/"title=" descriptions, "border=", dimensions/resolutions ("width=", "height="), and full CSS customization ("style=", "class=")
* A way to limit this variable to certain domains and even directories (and all subdirectories) of a particular domain (such as the one the wiki is on) to prevent abuse
Comment 1 Rob Church 2007-08-06 02:29:22 UTC
We don't support <img> in core for the simple reason that it's not wiki text; $wgAllowExternalImages is a convenience option.

I wouldn't object to an extension which does this.
Comment 2 Purodha Blissenbach 2007-09-17 10:01:35 UTC
There are two problems with the images shown in response to $wgAllowExternalImages=true

1. there is no simple way to have their size ajusted,
2. there is no [[...|thumb|...]] option.

The latter can be overcome (imho well enough) by placing the image URL as a parameter into a template call, and have the template take care of proper formatting. Of course, such templates duplicate an effort aready made elsewhere. While this works fine for images being small enough, it becomes excessively complicated when it comes to size adjustments.

Such adjustment could be made by putting an image into a container, and have common.css say something similar to:
   .scaleimage.img { width:100% }
effectively asking browsers to skale the image to the width of its container, which has to be a block element having class="scaleimage" (just an untested thought)

I suggest:

A. *IF* it is easy to allow [[ ... |thumb| ... ]] to be fed with an URL in addition to Image:..., then add a switch which permits it, or let $wgAllowExternalImages=true enable it.

B. So as to ease CSS-styling of externally embedded images, add somthing like class="externalimage" to the generated <img ... /> tags. Currently, there is no class attribute.

Comment 3 C. Scott Ananian 2014-05-29 20:11:22 UTC
gwicke is working on a <domparse> wrapper which might be a good building block for extensions which want to embed raw HTML.

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


Navigation
Links