Archived topic
Blog post featured image thumbnail size
4 replies · Started by dale on May 31, 2017
Is it possible to set a mximum width and height on post thumbnails that appear on the blog page, as opposed to an exact width and height? I'd like the max width to be 300 and the max height to be 200, but entering those numbers in the blog featured image area of the customizer crops the images instead of resizing them proportionally.
Hi Dale,
I don't think you can set a max condition on both width and height for responsive issue and I'm not sure if that makes sense as both condition has to be satisfied..
I would recommend setting either width or height in the customizer and leave the other blank then it will be scaled automatically.
Let me know if this helps.
Yea, you'd have to do one or other (or else you'd be messing up the image without cropping it).
Width:
.post-image img {
max-width: 300px;
}
Height:
.post-image img {
height: 200px;
width: auto;
}
Thank you!
Glad we could help!