Home » WordPress » WordPress: Set Maximum Image Size For Your Site

WordPress: Set Maximum Image Size For Your Site

posted in: WordPress 0

It’s happened to all of us. We insert an image on a page or post and it’s too big causing your layout to break or the image overflows into your sidebar. Use the following code placing it into your .css file:

1
2
3
4
.post img {
max-width: 300px;
height: auto;
}

You can change the max-width according to your content width.

Leave a Reply

Your email address will not be published. Required fields are marked *