Featured images are visual representations of your posts and pages. Their size and position are determined by your WordPress theme, but you might be looking for a way to customize them.
Changing the dimensions of your featured images is quite easy. Plus, you can do this on an individual basis, or apply changes across your entire WordPress site.
In this post, we’ll take a closer look at featured images in WordPress. We’ll show you how to set them in your posts and pages and change the default size of these images. Let’s get started!
What Are WordPress Featured Images?
Typically, featured images appear at the top of a WordPress page or post. They help draw readers in and provide context.
There are other places where people encounter featured images, such as:
- Blog archives
- Your homepage
- Post recommendation boxes (e.g. recent or popular articles)
- Image galleries
- Search engine results
- Social media platforms
- Online publications
An eye-catching featured image can drive traffic to an article. Ideally, it should be relevant to the topic.
For instance, if you’re writing a post about making money online, you might choose an image that depicts a person with a laptop.
How Does WordPress Handle Featured Images?
When you upload an image to WordPress, your site will generate versions of it in different dimensions (while retaining the original image size).
The new image sizes include:
- Thumbnail size (150 x 150 pixels). This is the smallest image size and is used within post previews.
- Medium size (maximum 300 x 300 pixels). This mid-size image is generally featured within your page content.
- Large size (maximum 1024 x 1024 pixels). The largest image size displays your picture on a much larger scale.
You’ll also have a full size, which is the original image you uploaded.
Most WordPress themes enable featured images by default, but the specific dimensions vary.
Some website owners stick to image dimensions of around 1200 x 600 pixels. This tends to look good across many WordPress themes, but it also works well for social sharing purposes.
How to Set Featured Images in WordPress
Now, let’s look at how to set featured images.
First, you’ll need to open an existing post/page or create a new one. Then, click on the Settings icon to the right of the editor. In the Post tab (or Page tab), there should be an option to Set featured image:
After clicking on this button, you can select an image from your Media Library. You can also upload a new media file from your computer.
Once you’ve chosen an image, you’ll see the attachment details. Here, you can add alternative text to describe the image.
You can also enter an SEO-friendly image title, caption, and description:
When you’re ready, click on Set featured image and save the changes to your post or page. It’s a good idea to visit the page on the front end to make sure that the featured image looks good.
How to Change Featured Image Size in WordPress (3 Ways)
There are some scenarios when it makes sense to change the WordPress featured image size.
For example, you might want it to match your theme layout. Or, you want to ensure that it looks good on the social media site where you primarily share content. This might involve enlarging images without losing quality.
Here are three methods to change the featured image size in WordPress.
Method 1: Edit Individual Images in the Media Library
The Media Library offers different ways to edit images. For example, you can use the cropping feature.
To do this, go to Media > Library from the WordPress dashboard. Select your image and click on Edit Image at the bottom of the preview:
Now, click on Crop and adjust the image size manually. Alternatively, you can input the dimensions in the relevant boxes:
You’ll then need to click on Apply Crop for the changes to take effect.
Depending on the original size, cropping the image can result in poor quality. Also, with this method, you’re only changing the size of a single featured image in WordPress.
Method 2: Use the Theme Customizer
If you have a classic theme (i.e. not a block theme), you can use the Theme Customizer to change featured image sizes across your entire site. Note that not all themes let you do this.
Head to Appearance > Customize, then go to Posts/Pages Layout and select Single Post Layout. This controls the layout for all your WordPress blog posts:
If you scroll down, you might find options to hide/show featured images:
You can also determine the featured image position and the image width and ratio. Every theme has its own settings, so your options might look different from ours.
Method 3: Edit Your Theme Template File
Another way to change the WordPress featured image size is to edit your theme’s functions.php file.
While this isn’t too complicated, you’ll need to be comfortable accessing and editing website files. We strongly recommend making a fresh backup first, since a single error could cause serious problems for your WordPress site.
Not all themes support this function, so you’ll have to check the documentation. Plus, the file will be overwritten when your theme updates, so it can be better to create a child theme.
Locate the functions.php file. You can do this by going to Appearance > Theme File Editor:
Alternatively, you can use your hosting provider’s File Manager, or connect to your site using FTP. If you opt for this route, you’ll need to locate the root directory of your site (usually labeled public_html).
Then, go to wp-content > themes and look for functions.php. Open the file and add the following line of code:
<!--?php set_post_thumbnail_size(width, height, crop);
?-->
Where it says “height” and “width”, you’ll need to enter your featured image dimensions in pixels.
The “crop” option will cut the image to the appropriate size. To enable this setting, enter “True”. If not, enter “False” or simply leave it blank.
How to Change All the Default Image Sizes in WordPress
As we’ve mentioned, WordPress creates multiple copies of your uploaded images to use in blog archives and other locations.
Some site owners choose to disable this feature as extra image copies take up server space. But you can also change the default image sizes if they don’t work well for your theme.
To do this, go to Settings > Media:
Here, you can change the dimensions for your thumbnail size, medium size, and large size images. Once you’ve entered the correct height and width for each of your blog images, click on Save Changes.
Conclusion
A featured image draws attention to your article and communicates the topic. But you might need to change the featured image size to reflect personal preferences or tailor it to fit your layout.
To recap, here are three ways to change the size of featured images in WordPress:
- Edit individual images in the Media Library.
- Use the Theme Customizer.
- Edit your theme template file.
Do you have any questions about how to adjust WordPress featured images? Let us know in the comments below!
Sophia is a staff writer at WordCandy.co, where she produces quality blog content for WordPress plugin and theme developers, hosting providers, website development and design agencies, and other online businesses.
Leave a Reply