1

The situation:

I have both a development environment and a production environment of a website. Both are identical.

The issue:

On the production site, all post thumbnails show the full image instead of the resized image, even though the resized images are available. On the development site it's working perfectly fine.

The issue occurred after an update on the live site, in which some more images were set to new image sizes.

What I've checked/tried:

  • add_theme_support('post-thumbnails'); exists and is set in the theme
  • Regenerate all thumbnails (using the Regenerate Thumbnails plugin)
  • Clear all caches
  • File permissions are checked
  • The images are being generated, just not shown
  • Images are set properly
  • Checked for differences in code between the different environments
  • Updated / reinstalled WordPress

What could I be missing?

  • Are they working fine on local development server? – Robert hue Oct 16 '15 at 11:45
  • Sorry, seem to have left that out. The images are working fine on the development server, and until recently perfectly fine on the production server as well. There is no real good reason for it to not work anymore. – Sander Koedood Oct 16 '15 at 12:10
  • Would help if you show us the code you are using to call the thumbnails in your PHP. e.g.: <?php the_post_thumbnail('large'); ?> , also, are you defining new sizes aside from the default using add_image_size(). Often it is a matter of passing the right name of the thumbnail size you want. – 1cgonza Oct 16 '15 at 13:28
  • @1cgonza I could show you all relevant code, however, the code is not the issue, as the exact same code works properly on the development environment. And it's not a single image that's not working. All post thumbnails do not function properly on the production environment. – Sander Koedood Oct 16 '15 at 13:56
  • I would look in WP source and trace through the function you are using to fetch the thumbnail. You'll find all of the helper functions and see what data they operate on so you can inspect what's happening at the most basic level. There are a number of filters along the way that could be affecting output. – Milo Oct 16 '15 at 16:02
1

The answer is quite an obscure one. Halfway through I had to change the type of uploading from organized in month- and year-folders to not organized. This caused the old resized images to stop working.

All images had to be uploaded again before they worked.

  • For the next time there is a plugin that will regenerate the resized thumbnails. – Ramy Deeb Oct 28 '15 at 15:44
  • As I've stated in my question, I'm aware of the existence of that plugin and have used it. The issue was not with images not being there. The issue was with changing the organisation of the uploaded images midway through, causing the old images to no longer work properly, even after resizing images. – Sander Koedood Oct 29 '15 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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