Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I just moved servers.

When calling wp_get_attachment_image() or any of its sister functions the image returned is always the full-size image, scaled down, instead of the requested thumbnail size. This has a pretty nasty impact on load times.

Both AJAX thumbnail rebuild and Regenerate Thumbnails those have happily created plenty of thumbnails. WordPress just chooses to ignore them.

Thanks for any help. This might be a dupe of Major issue with image sizes being lost, only full size images being shown but I'm not sure.

Update

After some research, it appears that the attachment_meta => sizes array on each image has all the correct keys for sizes, but none of the values:

(
[width] => 677
[height] => 472
[hwstring_small] => height='89' width='128'
[file] => my_original_image.jpg
[sizes] => Array
    (
        [thumbnail] => 
        [medium] => 
        [large] => 
        [admin-list-thumb] => 
        [select-a-post] => 
        [detail] => 
    )

Why might this be happening?

share|improve this question

2 Answers 2

I'd be sure that the new server has the same php config as the last, mainly GD library or ImageMagick. Use phpinfo http://php.net/manual/en/function.phpinfo.php to check configs if it's shared and you can't get to the php.ini file.

share|improve this answer
    
thanks for the suggestion. unfortunately it does have the same PHP settings (ie GD). –  djb Feb 15 '12 at 10:15
up vote 0 down vote accepted

Found the problem.

It turns out somebody had done a slightly rough search and replace on the DB, breaking the delicately serialized data in wp_postmeta. thankfully I had a backup.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.