If your theme is using the_post_thumbnail()
to display the featured image, adding the following code in functions.php
file will display the Thumbnail size of the image (as set on Settings -> Media Settings):
add_filter('post_thumbnail_size', 'my_thumbnail_size');
function my_thumbnail_size() {
return 'thumbnail';
}
Or you can display the featured image in any width (X) or height (Y) you wish:
add_filter('post_thumbnail_size', 'my_thumbnail_size');
function my_thumbnail_size() {
return array(X,Y);
}
Related Posts:
- How to disable WordPress from creating thumbnails?
- set_post_thumbnail_size vs add_image_size
- the_post_thumbnail responsive srcset not populating with custom image size
- Set custom name for generated thumbnails
- New image size version only for the Featured Image file
- wp_get_attachment_image_src always returns full-sized image
- Add Title Attribute to WordPress Image the_post_thumbnail
- Can WordPress crop only the post thumbnails?
- Query the post which have a thumbnail
- Autogenerated Thumbnail compression depending on size
- How to use images uploaded with custom implementation of thickbox like the_post_thumbnail() functionality
- Media thumbnail for custom post inside post content
- Thumbnail and Featured Image With Fixed Sizes?
- List category posts – Thumbnails are not displaying
- Why am I getting errors in product.thumbnails.php? [closed]
- Is there a way to change a post’s thumbnail image(s)?
- how i can increase Featured thumbnails size?
- How check that there is post thumbnail feature image or not on wordpress?
- Force WordPress to strip/remove EXIF/IPTC metadata when resizing thumbnails
- If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with ‘new copies’?
- Is it possible to nest get_previous_post()?
- How to get cropped thumbnail source for custom post type
- Get ID of featured image using “get_post_thumbnail_id(the_ID())” – without printing to screen?
- How to offset thumbnails to the center?
- Sidebar Thumbs Squished?
- Aligning the thumbnail image
- Post thumbnail not working after regenerate
- How do get post thumbnail into plugin?
- “Medium” size image displayed instead of “thumbnail” in only one post, other posts are fine
- How to create resized versions of images added with wp_insert_attachment
- get_post_thumbnail_id() Doesn’t return value [closed]
- How To Add and Display Category Image
- get_the_post_thumbnail(‘thumbnail-name’) always returns empty string
- Can’t get post thumbnail to display in foreach loop
- Show posts image attachments
- Thumbnail is showing outside its div instead of inside it
- get_post_thumbnail does not display thumbnail
- Category page with thumb is ok but can’t do the same with tags
- how can I call a posts featured image in any template?
- how to resize thumbnail image
- Different thumbnails for index and article page
- Thumbnails not being generated for PDF files
- Thumbnail size problem Desktop vs Mobile site
- How do you code a featured image into an XML as a jpg link, instead of using a data-id number?
- How to change the format of thumbnails into wordpress theme?
- display div tag only if post has thumbnail
- Thumbnails are hard cropped not matter what
- Thumbnails regenerate wp_generate_attachment_metadata
- Featured image size always cropped bottom
- set_post_thumbnail() shows Unattached on backend under Media
- Allow ‘Set featured images’ to select multiple images
- Why wordpress doesn’t generate thumbnails?
- Force Regenerate Thumbnails Not Working
- Trouble Retrieving Thumbnail URL on Front-Page
- WordPress save thumbnail but don’t show it [closed]
- Automatic adding thumbnail to post
- Different thumbnail size than actual picture in post
- Where is the template from the_post_thumbnail()?
- Images thumbnail not cropping square
- Generate Thumbnails only for Featured Images
- How to add post featured image to RSS item tag?
- What’s the difference between post thumbnails and featured images (if any)?
- What is your take: TimThumb vs. WordPress Thumbnails? The great debate [closed]
- How to change the naming of the resized image files
- Allow user to manually set crop area of default/custom image sizes on upload [closed]
- Show featured image in sidebar
- Featured Image VS Post_thumbnail — has_post_thumbnail lies?
- Cropped thumbnail still displaying as full image
- Use Video as Featured Image
- Featured image is not uploading
- Image still attached to post even after removing it as featured image
- Create custom thumbnail size on existing posts
- thumbnails are getting clipped down, want to resize instead
- Multiple Post thumbnails (at least three)
- Secondary Featured Image Function (post_thumbnail)
- Getting thubnails for previous posts
- 2 image size for post
- Needs to add anchor tag in featured image to open in new tab
- Can’t generate thumbnail images
- How to both crop (with tool) and resize thumbnails having only a max width constrain?
- Function to scan for image, attach it to post, set it as featured [duplicate]
- get_the_post_thumbnail_url(‘full’) returns empty from custom post type
- Static news page has for thumbnail the featured image of the first posts
- Retrieving featured image on static blog posts page
- default post thumbnail and category if there is no thumbnail and category
- Check category before displaying featured image
- How to select which thumbnails sizes are displayed in srcset
- How can i find posts with duplicate featured images?
- Does delete_post_thumbnail() actually delete the image?
- How to change thumbnail default size?
- Custom header image, and content, on Posts Page in twentyeleven with Static Front Page
- Featured Image not shown and getting error “Object of class WP_Error could not be converted to int”
- “Use as featured image” not working , “Set Featured Image” hangs. GoDaddy Issue [closed]
- custom image size not being displayed in loop
- Show thumbnail depending on image width
- After migrating media library is not showing thumbnails
- featured image different style on the list and on single post
- set_post_thumbnail_size has no effect – always 200×300 size is generated
- Combining Post Thumbnails With Nivo Slider
- How to stop WordPress from creating native thumbnails?