Topic on Project:Support desk

Image Thumbnail Not Being Created When Image Used In Article

3
Adamhubble (talkcontribs)

I have MW 1.24.1 installed on CentOs7 with nGinx and PHP-FPM 5.4.16. I am not using ImageMagick.

With that stated, I am having an issue where thumbs are not being created for files when they are used in articles with a specific width defined. Image uploads work fine, and a thumb gets made when a file is uploaded (I assume it's what is displayed on the File:) page. However, attempting to use the image with a new size ends up with a 404 due to the thumb not being there. I am not getting any PHP errors, there is nothing in my system log or my web server logs that would indicate a permission issue.

I enabled debugging on a page that attempted to use a resized image, and the log can be found at http://pastebin.com/yeif2YHw

I don't know enough PHP to understand what the TransformationalImageHandler is doing, but I have a strong feeling that

TransformationalImageHandler::doTransform: creating 150x200 thumbnail at mwstore://shared-backend/shared-thumb/6/67/BFZLogo.png/150px-BFZLogo.png using scaler gd

TransformationalImageHandler::doTransform: Transforming later per flags.

File::transform transformation deferred.

isn't a good thing. The specific page that I am using to test this on (and which generated the above debug output) is here.

I appreciate in advance any assistance you can give, and will provide whatever information I am able to if there's something that would help diagnose this issue.

TheDJ (talkcontribs)

In order to make sure images are generated on the fly, you need to setup a 404 handler.

"File::transform transformation deferred."

This means that it will be picked up later by the job queue, it is normal when the 404 handler is not in place. Then if you refresh the page, usually the scaling has been done and the image should show.

However going to: http://wiki.magicjudges.org/pool/images/thumb/6/67/BFZLogo.png/150px-BFZLogo.png

Shows that something deeper is going on. I suspect you have a configuration issue with paths, or with the permissions of the thumb directory. Because of that you are only able to see thumbnails that had already been generated at an earlier time, but no new ones.

Adamhubble (talkcontribs)

What other processes would be involved in the generation of a thumbnail by the 404 handler if that is the case, and the one that is created during the process of uploading a new file? I would have assumed (and could very easily be wrong) that in both cases the resizing would be handled by the GD library within PHP. Permissions are sufficient for the php-fpm process to write to the thumbs dir at the time of upload, so I can't think what would have changed. Linux also isn't my forte, but I would expect to see a permission error shown in the system log of CentOs if not in the PHP log itself, and have found nothing in either.

I will look further into the 404 handler though, thank you for that lead. Any extra explanation you can provide in regards to my above comments would be appreciated.

Reply to "Image Thumbnail Not Being Created When Image Used In Article"