• Hi there!

    I am creating a new topic for something that was discussed here, since the workaround mentioned (manually tinkering with image size) is either time-consuming, or worse does not work, and I am looking for a better, permanent fix.

    Please click the first link for the problem and the second link for the desired image size.

    1. Title is pushed beyond the fold: Meghalaya’s Maidens’ Festival
    2. Desired Size: The Least Explored North East India

    Can someone here please help resolve this?

    Kind regards,

    Abhijeet

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    About the only way to do that permanently would be to create a Child Theme and then set new post thumbnail dimensions in the child theme functions.php file. It might require some adjustments to the CSS as well after the size change.

    Thread Starter backpackingseries

    (@backpackingseries)

    @sacredpath

    Thank you for the suggestions.

    Could you please recommend the appropriate code to insert in functions.php and the CSS adjustments to make all featured images the size of the desired post – https://www.backpackingseries.com/the-least-explored-north-east-india/

    PS: I’m not a programmer and would really appreciate the help.

    Kind regards

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi, this will take me a bit of time, so hang in there till I get a half hour or so to work on it. Should be within a few hours.

    Thread Starter backpackingseries

    (@backpackingseries)

    @sacredpath

    Thank you very much for helping me out! Look forward to your guidance to make featured images consistently-sized across the theme – in posts, pages, and portfolio.

    Kind regards

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi, before we get into modifying the php, which will come with some drawbacks if you do not want to have consistent image sizes, let’s try this custom CSS and see what you think.

    .entry-hero img {
      max-height: 900px;
      object-fit: cover;
      object-position: 50% 0;
    }

    What this does is to set a maximum height for the featured image and then manipulate the image to cover the entire area and adjust the position. There could be some wackiness that could occur with some images depending on the nature of the image. As long as the important bits in the image are kept in the upper third of the image, and centered left-to-right, all should be pretty good.

    Thread Starter backpackingseries

    (@backpackingseries)

    @sacredpath

    Thank you for the CSS. It is now part of the Additional CSS under Customizer. However, as you can see by clicking the links below, it has had no effect on the featured images.

    1. Title is pushed beyond the fold: Meghalaya’s Maidens’ Festival
    2. Desired Size: The Least Explored North East India

    Please suggest.

    Kind regards,

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hmmm, that all worked for me when I was doing it with my web inspector. Try setting the max-height to 700px and/or adjust as you desire, and set the object position to 50% 50% and then add the following also.

    .entry-hero .post-thumbnail img {
      width: 100%;
    }
    Thread Starter backpackingseries

    (@backpackingseries)

    @sacredpath

    Thank you very much. Joy is at 500px of max-height ??

    Kind regards,

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hooray and you are welcome! Joy is GOOD!

    Thread Starter backpackingseries

    (@backpackingseries)

    There’s a good reason why they call you the ‘Happiness Engineers’! ?? Thanks much / Cheers

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Well, thank you and you are welcome. ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to make featured images consistently-sized across posts?’ is closed to new replies.