If you are using wordpress blogs, then you are familiar with the default theme which is a theme full of features, though its not liked by many because of the looks. In the Default Wordpress theme whenever you upload any images of any width , they are automatically resized to the theme’s maximum width, not breaking the whole blog and the sidebars. This kind of feature is really required when you are adding multiple images and are looking for perfect looking blog.

When you use other available wordpress themes, then there are chances that you will get problems with the images section because the themes are broken when the size of image exceeds the current theme’s content section width. Any solution for this using wordpress plugins? No there is no real quick solution for this because most wordpress themes are simply coded and the theme developers dont add code for automatically resizing the images added in the content section. The plugins available on the web only work for images which are hosted in your server and do not support for the images which are hosted somewhere.

Solution for Automatically Resizing Images :
You need to access your style.css file located in the themes folder and add the following code -

.post img {
max-width: 530px;
width: expression(this.width > 530 ? 530: true);
}

Generally in your stylesheet the content part is denoted by .post but depending on the theme it can be .post, .content, .center etc and you need to trace the same and add the above code somewhere in your file. Once saved, it starts working and resizes all the images to the given width/size dimensions.

Image Auto Resize Properties

One of my image posted in this blog was of the size – 603px × 136px but it got Automatically scaled to 530px × 120px , which means that it resizes the images to the given width and height respectively. You need to find the maximum width of the content part of your blog and save the dimensions in the above given code.

We will send you useful technology related Tips. Enter your email address :