0

I am building a site which can be viewed here: http://inspiredworx-labs.com/sites/garyarnold/

As you will see on the homepage, I have a grid, the site is responsive so am using % over px for widths. You will see that the featured images are different in sizes. I have used this in my functions.php file:

add_image_size('thumb-700', 700, 394, true); // the_post_thumbnail('thumb-700');

I want all the images to be the same size; what am I doing wrong?

Note, I want the images to be 700px wide for when the screen size gets smaller.

Thanks in advance.

Answered:

My issue was down to some images being smaller than the required width and/or height. Something so simple but I hope it helps others in the future.

5
  • Did the images already exist before you defined the custom image size? If so, have you regenerated thumbnails for existing images? Commented Oct 3, 2013 at 12:29
  • I uploaded them but have Regenerated them several times during testing to try and get them to display correctly. The images are all of different sizes/dimensions originally, some the same but there is a good mixture. Commented Oct 3, 2013 at 13:21
  • Are all the images at least 700x394? Commented Oct 3, 2013 at 13:58
  • I have faced a similar issue. can u make sure all the images loaded has a image size greater equal to 700X394 that means it should be atleast 700X394? Commented Oct 3, 2013 at 14:02
  • Doh! It was to do with smaller sized images. I used the WPTest data to test my site which contained some smaller images. I feel so silly missing that out! (wptest.io) Thank you so much for the replies. Commented Oct 3, 2013 at 14:05

1 Answer 1

0

My issue was down to some images being smaller than the required width and/or height. Something so simple but I hope it helps others in the future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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