Blog images not cooperating

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

What am I doing wrong? The site URL is https://2aready.com

/* Constrain blog images to a maximum height and width */
.article img {
max-width: 500px;
max-height: 500px;
width: auto;
height: auto;
object-fit: cover;
}

@In2Deep , In your theme.liquid you should wrap your css code with


But what’s exactly image do you want to constrain ?

Hi @In2Deep
Please put this css in theme.liquid before body closing tag


Please press Like and Mark Solution if you find it helpful.
Thanks!

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

That worked for constraining the images! Thank you, now I need to figure out the padding.

Which padding @In2Deep ?
Can you please explain
If you want to put it in left remove “margin: 0 auto;”, I added that to center the image

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?

Please try this


Thanks!

@In2Deep


Remove previous code &

Please try this

Perfect, thank you.