Last modified: 2014-05-29 20:11:22 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
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.
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.
gwicke is working on a <domparse> wrapper which might be a good building block for extensions which want to embed raw HTML.