Last modified: 2014-05-22 19:12:59 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 T30491, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28491 - make file extension for external images configurable
make file extension for external images configurable
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.18.x
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-11 14:47 UTC by Daniel Kinzler
Modified: 2014-05-22 19:12 UTC (History)
2 users (show)

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


Attachments

Description Daniel Kinzler 2011-04-11 14:47:57 UTC
currently, the file extensions that cause an external link to be rendered as an image if $wgAllowExternalImages is true is hardcoded in Parser::EXT_IMAGE_REGEX. It would be much nicer if it was derived from $wgFileExtensions. Not all allowed file extensions are images, but the ones that are can be identified using MimeMagic::guessTypesForExtension($mime) and MimeMagic::findMediaType($mime).
Comment 1 Brion Vibber 2011-04-11 17:06:01 UTC
I'm not sure there's not much benefit to using $wgFileExtensions; $wgFileExtensions controls what you can locally upload so that it can be verified, managed, rendered into thumbnails, etc. None of that happens with external images -- they're just put into an <img> so there's no interpretation or rendering that would depend on the file type. 

We don't even get a chance to control the image's size... :(

I'd actually rather drop $wgAllowExternalImages entirely and replace it, if it's needed, with a smarter way of dealing with externally sourced images; guessing imageness from URLs has never been safe or complete to begin with.

Legit use of externally-referenced images is probably better off being done as some sort of extension that lets you explicitly size, place, and caption them.

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


Navigation
Links