Page MenuHomePhabricator

Most image options shouldn't depend on $wgUseImageResize
Closed, ResolvedPublic


Author: alanyst

I ran into this on a local install of MediaWiki. With the default setting (in
1.3.1 anyway) of $wgUseImageResize = false, including image options like this:

[[Image:some_image.jpg|frame|center|Some caption]]

will not work. The problem is in makeImageLinkObj() in Skin.php: options are
not processed unless $wgUseImageResize == true, despite the fact that only the
thumb and __px options are related to image resizing.

The workaround is of course to set $wgUseImageResize = true in
LocalSettings.php, but it's not very intuitive that the way to enable image
alignment and framing is to set a resize flag.

Version: 1.3.x
Severity: enhancement
OS: Windows XP
Platform: PC



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 6:47 PM
bzimport set Reference to bz178.
bzimport added a subscriber: Unknown Object (MLST).

rowan.collins wrote:

There appears to be a seperate $wgUseImageMagick; we may be able to rename
$wgUseImageResize to $wgExtendedImageSyntax, and make sure actual resizing can't
be done if $wgUseImageMagick is false.

jeluf wrote:

$wgUseImageMagick determins whether the built-in GD library is used for scaling
or whether the ImageMagick command line tool is used.

rowan.collins wrote:

Ah, I thought I might be missing something. Is there any reason not to just
always enable the extended image syntax? We could just put checks on
$wgUseImageResize round bits of code that actually do image resizing. This could
also allow us to have the fallback ability somebody asked for of setting height=
and width= attributes on the image without actually generating a thumbnail.

jeluf wrote:

Fixed in CVS HEAD, Skin.php rev 1.295