I wanted to set the max height for the featured image on my blog posts to 300px.
After reading a number of support threads about setting the featured image height I installed the “Simple Image Sizes” addon and changed the entry_with_sidebar size max height to 300 with cropping set to yes.
I uploaded an image that is only 300px tall but the featured image size is double that once the post is published.
It seems to work ok when it’s a wide image, but narrower images are not displaying properly.
Is anyone able to assist with this?
Link to the post: https://alexilum.com.au/news/alexilum-is-a-myob-partner/
Link to the image: https://alexilum.com.au/wp-content/uploads/MYOB-Partner-Tall.jpg
Hi,
Please try the following in Quick CSS under Enfold->General Styling:
.big-preview.single-big img {
max-height: 300px !important;
}
Best regards,
Rikard
Thanks Rikard
That did fix the height but then the image was stretched across the full width out of proportion.
I tried adding width: auto but that just took me back to the original issue.
Can I set the image to be kept in proportion?
BTW I did regenerate the thumbnails.
Thanks
Ok I worked it out…
.big-preview.single-big img {max-height: 300px !important; width: auto !important;}
Thanks!