Social Icons

twitterfacebooklinkedinbehancerss feedemail

Tuesday, April 16, 2013

Wordpress Quirks: Why Featured Images Don't Display As Thumbnails On A Newly Installed Theme

Wordpress Quirks: Why Featured Images Don't Display As Thumbnails Correctly

One of the more stranger issues kept our team on our toes during a Wordpress project recently. We couldn't figure out why in the world any post or page containing a featured image wouldn't re-size when it was being displayed within any of the site's widgets or page elements. In fact it would display the image at it's full size. Imagine a typical recent posts widget containing a bunch of images that are more than 700px wide each. Should be an easy fix right?

At first we installed the theme on a local version of Wordpress to see if it was a glitch in the theme itself. The images were displaying correctly on our local setup so we then tried removing the theme completely and reinstalling it. No such luck with that either. Then we went through all the fixes we found from doing the rounds on google and searching through the Wordpress forums. The most popular solution seemed to be a code addition to the functions.php file:

if ( function_exists( 'add_theme_support' ) ) {
  add_theme_support( 'post-thumbnails' );
  set_post_thumbnail_size( 350, 150, true );

  add_image_size( 'post-thumb', 350, 150, true );
}
http://wordpress.org/support/topic/cannot-select-featured-image-sizes-only-original-size

Even though we tried it, we knew this solution didn't make sense because this code never had to be added before in order for thumbnails to display at the correct size in previous themes. We even tried reaching out to the theme creator for help and this seemed to even stump them.

To make a long story short, after we set permissions to allow the image directories to be editable, we simply had to remove the images from every post and re-upload them back to the server.

wordpress/wp-content/uploads
 
In other words, the problem resided in the fact that we began to edit the site before all file permissions were set. Once we fixed the permissions, the images needed to be removed and uploaded again.

Quick Solution: Remove all images that are not displaying corrects and upload again to your host.

ShareThis

 

What We Do...

Queens Web Design and Graphics is a web and graphic design company in Queens, NY specializing in providing local businesses with affordable websites offering design, animation and multimedia services. Learn More...