Content Management System ( CMS ) has a variety of features for incorporating visuals into a website, one of which is the WordPress Featured Images. They can also significantly increase the value of content when used in conjunction with well-written text.
What are WordPress Featured Images?
A WordPress featured image is the main image displayed on your post or page. This image is usually displayed at the top of posts and in social media posts when you share them on social media.
How to Add WordPress Featured Images
Adding WordPress featured images is a simple process. Simply upload or select an image for each post or page.
How to Add Featured Images to a WordPress Page or Post
Featured images are enabled by default in most WordPress themes. You can also manually add them to any post or page via the Gutenberg block editor.
Follow the steps below:
1. By navigating toPanel Posts → Add New Posts , open the block editor. Alternatively, select an existing post or page to enter the editor.
2. The right sidebar should appear in the block editor.
3. Scroll down toFeatured Imagesection, and then clickSetting Featured ImagesThe
4. Upload the featured image to WordPress or select from the images in the media library. After selecting the featured image, theAnnex details sectionAdd alternative text.
5. Click on the bottom right corner of theSetting Featured ImagesThe
The featured image is now set. It does not appear in the editor panel and can be found in theFeatured Imagesection or see it in the post preview. There is now the option to click on the"Replace the image"Replace it with another image or use theDelete Featured ImageRemove featured images from posts or pages.
How to Set WordPress Featured Image Size
Choosing the right featured image size is important. It makes your overall page look great and ensures that post thumbnails look good on other platforms.
While you can choose your favorite WordPress featured image size, the1200 x 628 pixelsmaybe16:8.4Aspect ratios are a good place to start. You can use smaller images to speed up load times, especially on mobile devices.
The default featured image size settings for WordPress themes may not suit your preferences. Consider changing the image size using one of the following methods.
1、Classic theme
Whenever you upload an image to WordPress, you'll find four default image sizes in your WordPress settings:
- Thumbnail (150 pixel square)
- Medium (maximum 300 pixels in width and height)
- Large (maximum width and height 1024 pixels)
- Full size (original image)
Some WordPress themes use one of these default image sizes as the featured image. You can change its size by following the steps below:
1. Check the size by opening the blog post with the featured image. Right-click on the blog featured image and select your browser'sCheck the tools.
2,read (instructions)<img>The image class in the markup. For example, the featured image size below is width="480" height="300"
3. Open the WordPress dashboard and navigate to theSettings → Media. Change the size to your preferred image size and click "Save Changes"The
If you regenerate the image thumbnails, you can do so by installing and activating thereGenerate Thumbnails Advanced WordPress plugin to do this.
- First, in the panel "plug-in (software component)"→"Add New Plugin", type reGenerate Thumbnails Advanced in the search field and press "enter" to confirm.
- Then clickInstallationfurthermoreactivateThe
After refreshing the page from the"Tools" → "Regenerate Thumbnails"access, and then click the plugin panel's"Re-generation" . It will automatically resize WordPress thumbnails for all existing images.
2. Block theme
By modifying the site editorin the template to resize WordPress featured images. Follow the steps below to open the template:
1. Go from the WordPress dashboard to theAppearance → Theme File Editor.
2,Select the file to be modified::
- Select the theme you want to modify in the editor.
- Typically, the code for the featured image is located in the
single.php
maybepage.php
file, or sometimes in thefunctions.php
or template section files such ascontent.php
Center.
3,Modify the code for the featured image::
- Find the code that calls the featured image in the corresponding PHP file, usually the
the_post_thumbnail()
or a similar function. - You can specify an image size that already exists (e.g.
thumbnail
,medium
,large
maybefull
), or use theadd_image_size()
existfunctions.php
file to create a new image size. Example:
add_image_size('custom-size', 800, 600, true);
Then, after calling the the_post_thumbnail()
function when specifying this new size:
the_post_thumbnail('custom-size').
4,Updated and tested::
5,Adjustment style (optional)::
- If you need to further adjust the styling of an image (e.g., margins, frames, etc.), you can do so with CSS. These styles are usually found in the theme's
style.css
file is set.
How to Automatically Set Featured Images in WordPress
utilizationQuick Featured ImagesThe plugin makes it easy to create default featured images.
First, in the panel "plug-in (software component)"→"Add New Plugin", type Quick Featured Images in the search field and press "enter" to confirm.Installation and activationThe
After refreshing the page, navigate from the WordPress dashboard to theFeatured Image → Default Image.
Activate the second rule, which designates the first photo in a post or page as its featured image.
Alternatively, create custom rules that assign default featured images.
Click on the third step of the"Select Image", and then select the default featured image. When finished, click"Save changes"The
How to add thumbnail previews to post and page listings
The WordPress admin panel displays information about posts and pages, such as author, publish date, category and number of comments. If you have the 'Quick Featured Image' plugin installed, you can also display thumbnails in this list, so that at a glance you can see which content has a featured image set.
Go from the dashboard to theFeatured Images → SettingsThe InFeatured image column in post listIn the section, checkcardcap (a poem)web page. Then, click the bottom of the pageSave changes.
Navigate to Posts → All PostsGo to the list of posts and you'll see a new column for previewing Featured Images, with the ability to change, edit and delete old featured images.
How to Enable WordPress Featured Images
Most WordPress themes support Featured Images and allow you to upload images to any post or page. However, a few may not support featured images thatIt must be enabled manually.
Classic Themes
By adding the following code snippet to the theme'sfunctions.phpfile to manually add featured image support to any WordPress theme:
add_theme_support( 'post-thumbnails' ).
Themes should now support featured images and the settings should be available on the editor. However.Add Theme SupportThe flag enables support only and will not display an image on the front end.
To make the theme display featured images on all posts and pages, add the following code snippet to the theme's template:
<?php the_post_thumbnail(); ?>
To display images on posts and pages, add the code to the appropriate template - usually thesingle.phpcap (a poem)page.phpYou can also apply PHP code to any custom template file. You can also apply PHP code to any custom template file.
By navigating to"Appearance" → "Theme File Editor" to use the Theme File Editor.Find the template file in the right-hand column.
Suggestions for Choosing WordPress Featured Images
Using the right image
WordPress Featured Images should properly represent the content. One of the best practices is to create uniquely designed featured images that have the same style as your blog.
If you're just starting to create a blog from going throughCC0 Licensed Image SitesCreative Common The right featured image can be found. It can also be found in thePexelscap (a poem)UnsplashLook for CC0 images on material platforms such as, and wordpressPhoto CatalogIt contains thousands of CC0 images uploaded by contributors.
Optimize your featured image
Use different image compression methods, such as lossy and lossless compression, to optimize image files in a variety of formats, including PNG, JPG, and GIF.Doing so can help you reduce file sizes and get images loaded faster online, while still maintaining image clarity.
Here are some recommended image optimizer plugins:
reach a verdict
WordPress has built-in support for featured images and you can also set up featured images automatically. Optimizing images and adding alternative text through settings helps your SEO boost.