Topic on Project:Support desk

WTF - MediaWiki creates a thumbnail multiple times?!

3
88.130.106.99 (talkcontribs)

Hi guys,

during one single request, MediaWiki tries to create one and the same thumbnail multiple times.

Start request GET /Main_Page
...
Pulling file metadata from cache key wiki:file:8866e45e917553a7dbb1198218cfa928
MimeMagic::__construct: loading mime types from /www/wiki/includes/mime.types
MimeMagic::__construct: loading mime info from /www/wiki/includes/mime.info

File::transform: Doing stat for mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png
FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png does not exist.
BitmapHandler::doTransform: creating 450x151 thumbnail at /tmp//transform_64c4649d3b12-1.png using scaler im
BitmapHandler::doTransform: returning unscaled image

File::transform: Doing stat for mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png
BitmapHandler::doTransform: creating 450x151 thumbnail at /tmp//transform_40e462b65414-1.png using scaler im
BitmapHandler::doTransform: returning unscaled image

File::transform: Doing stat for mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png
BitmapHandler::doTransform: creating 450x151 thumbnail at /tmp//transform_341bb62f6727-1.png using scaler im
BitmapHandler::doTransform: returning unscaled image

For this image, it does not make sense to create a thumbnail with 450x151 pixels, as that is exactly the size of the original. In so far I think it is correct, that MediaWiki says it returns the original image.

But why is it doing that three times in a row?

Ciencia Al Poder (talkcontribs)

If this happens on a new MediaWiki installation without extensions enabled, please feel free to report it as a bug. See How to report a bug

88.130.118.49 (talkcontribs)

Issue 49528 created.

I have now stripped down the situation needed to reproduce this weird behaviour:

This is the wiki text, which I am using: [[File:Image.png]]

Image.png has a size of 450x151 pixels and in the page it is given out in original size. So the image should not be thumbnailed at all - and especially not to 450x151, which is the original size.

The wiki is

  • without any extension
  • with the vector skin

The problem exists

  • no matter, if a user is logged in or not.
  • no matter, if I set $wgUseImageMagick = true; (so that ImageMagick is used for scaling) or $wgUseImageMagick = false; (so that GD is used)

The error does not happen, when the image should actually really be made smaller: Then the thumbnail actually is created and is used on later hits.

This post was posted by 88.130.118.49, but signed as 88.130.81.44.

Reply to "WTF - MediaWiki creates a thumbnail multiple times?!"