How to Reduce the Size of the Featured Image in a WordPress Post
Do you wish to learn how to reduce the size of a featured image in a WordPress post? This problem, and the solution that I later stumbled upon, came about as a result of my eternal struggle to stay in AdSense’s good books. As you may be aware, AdSense is very particular about certain things, and to avoid being banned, I have been making a few changes to my site.
Resize the featured image in a WordPress Post
One of the things that I noticed was that the featured image in my posts was pushing content below the fold, which is a “bannable” offense in AdSense. So, how do you reduce the size of the featured image in a WordPress Post?
Changing the Size of the Featured Image in WordPress
Fortunately, the theme that I am using comes with a handy way for me to switch off the featured image in posts. This removed the problem and ensured that my AdSense ads were now appearing alongside each article’s content right where I wanted them to be.
But, if you would rather keep the featured image, here is how to reduce the size of the featured image in a WordPress post to make sure that the text that makes up your content wraps around it. This is another good way through which you can keep your content, alongside your ads, above the fold.
Reduce the size of the featured image in a WordPress Post
To reduce the size of the featured image in a WordPress Post, all that you need to do is go into the “Customize,” section of your site. Once there, paste in the following code;
.single-post .featured-image {
float: left;
width: 150px;
height: auto;
margin: 12px 24px 0 0;
}
The Explanation
The above post is how you can reduce the size of the featured image in a WordPress post. Note that you can play around with the settings that are in there to get the size that you are really looking for.
float
This can either be “left” or “right.” Choose the setting that best works for you. You can also completely cut out the line of code that begins with “float.” What this does is leave your featured image above your post, which is not what we are looking for since that still pushes our content below the fold.
width
The good news is that when resizing the featured image in a WordPress post, you can choose to have any width of your liking. Just substitute the number in this particular line of code with the one that you prefer. You will notice as you are working in “Customize,” that the image size will change as you change the numbers.
height
Leave that at auto.
The setback
The one setback that you will notice is that the featured image becomes unresponsive when you do the above. That’s no major concern in my case, since the AdSense Ads themselves do not appear to be responsive! Anyway, hope this article helps you resize the featured images in your WordPress articles.