• Resolved johnjf

    (@johnjf)


    Not sure what’s going on with my featured images. There not sizing the same in each post. Here’s the link to my site http://elusivebuck.com/

    You can see the image on the right post is not as wide as the other on the left.

    I did the post thumbnails setting and set it to (375, 158, true )

    I put the_post_thmbnail code in and also tried adding the css for post thumbnail to the same width and height but it’s still not making the image the same sizes.

    What might be the problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The problem is most likely the height of the original image. If an image is narrower, but taller, it will get reduced to 158 and then cropped. If you start with a wider image, it will be reduced to 375 and then cropped.

    It’s best to start with images that are at least similar shape, so either all landscape or portrait.

    You could try removing the height and just define width
    for a better result. I’d just use css for that, and remove the_
    post_thumbnail size definition.

    Thread Starter johnjf

    (@johnjf)

    Thanks for the help. What I did was try removing the height in the css and it did nothing so I changed the code to

    add_image_size( ‘post-thumb’, 375 ); // homepage thumbnail

    it showed the image width the same but the height wasn’t the same, it was off by about 15px so I added the height back into the css and now it’s showing up properly.

    Guess it was an issue like you said Christine with the image not being as big as the one in the post on the left.

    Thanks again for the help, greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘featured image not sizing the same’ is closed to new replies.