I’m trying to constrain my blog images to no more than 500px in height and width. I’ve tried putting the following code in the theme’s custom css box, I’ve tried it in assets/blog.css and in theme.liquid
/* Constrain blog images to a maximum height and width */
.article img {
max-width: 500px;
max-height: 500px;
width: auto;
height: auto;
object-fit: cover;
}
That didn’t change anything for me. I would like to constrain any and all images posted as a blog image to remain a constrained size becuase a 1200x1200px image doesn’t look good. The blogs are located at: https://2aready.com/blogs/news
Here are two examples now that the images are constrained there is a considerable gap on some images that are 500 pixels in width but don’t have the height. Is there a way to auto adjust so that a shorter image height doesn’t block off so much wasted space?