How to Add Featured Images or Post Thumbnails in WordPress


WordPress.org
Elisa Rivera

The default image sizes of WordPress are “Thumbnail”, “Medium”, “Large” and “Full Size” (the original size of the image you uploaded). These image sizes can be configured in the WordPress Administration Media panel under >Settings > Media. You can also define your own image size by passing an array with your image dimensions:

How to Add Featured Images In WordPress
Naomi Pratt

But generally speaking most themes will work with the WordPress image resizing function (not really because it’s better but because it’s easier) so be sure to see if your theme has any custom options to select your custom sizes either in their theme panel or in the Customizer under Appearance > Customize. If you locate settings and you can tweak them accordinly and if not, most likely the theme has preset sizes, but in either case if your theme is using the native WordPress sizing function simply go to Plugins > Add New and search for and install a popular and high rated “Regenerate Thumbnails” plugin than visit it’s settings and run the script so that images on your site can pass through the correct functions and get resized either according to your custom settings or the theme’s default settings.

How to Add Featured Image Thumbnails to Your WordPress Theme
Elza Leyva

Thumbnail support must be enabled within your theme. You could add it to a plug-in so it’s available to all themes but that may not be appropriate in every case. Therefore, you’ll need to open or create a ‘functions.php’ file within your theme folder (wp-content/themes/theme-name/).

Add featured image or thumbnail to WordPress post
Lynsey Colson

$width => Optional. An integer value of post thumbnail width in pixels.
$height => Optional. An integer value of post thumbnail height in pixels.
$crop => Optional. Boolean value for cropping of post thumbnail. False – Soft proportional crop mode ; True – Hard crop mode.

Be the first to comment

Leave a Reply

Your email address will not be published.


*