I think you given like
echo the_post_thumbnail($post_id);
No need of giving echo if we are using the_post_thumbnail().It by default echoing the result.So here, it will display the image twice.
If we use get_the_post_thumbnail(), then echo is needed.
So use either
echo get_the_post_thumbnail();
or
the_post_thumbnail();
Try this..
Related Posts:
- Automatically replace original uploaded image with large image size
- How to scale up featured post thumbnail?
- Custom image size / thumbnail – Crop to aspect ratio even when source image is smaller than set dimensions
- wp_get_attachment_image_src and server path
- get_post_gallery_images returns thumbs . I want full size
- How to resize images in wordpress without adding any compression or changing the color profile of the images, possible?
- Why is wp_get_attachment_image not including “full” size in srcset?
- Get img alt tag from a Image that has been uploaded through the Customizer
- Get Attachment ID from URL [duplicate]
- How to set twenty fourteen header image at 100% width?
- WordPress speed slow after .5 million single image post via wp-cli
- Can’t Display Featured Image in RSS Feed
- Filter to modify post_title after image upload?
- Generate image size, based on the image-orientation
- Import Images from one self-hosted WordPress install to another
- How to Optimize images after uploading all images to WordPress Site?
- How to get relative URL of medium sized featured image?
- How do i reference the theme path in pages for images?
- How to Add extra option to Image Block Settings?
- Upload thousands of images to WordPress without plugin?
- Using srcsets to load different images based on browser widths
- Multiple entries for one object with different cover images
- How to exclude an image size from the WordPress srcset
- Automatically replace original uploaded image with large image size
- Problem with loading images from child theme CSS file with relevant path
- Generating different dimension images while uploading image file from custom plugin page
- is it possible to crop cover images in buddypress?
- Any specific reason why images do not show on site?
- How to intigrate multiple image uploader in a custom post type
- Disallow img tag in comments?
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- Stripping the_content() from images then displaying them seperately
- Image upload appearing as broken images following server move
- Regex expression for redirecting image URLs to another folder
- renaming an image automatically everywhere else (posts and pages)
- Change wp-content/uploads to uploads/%postname%/%image%
- Add suffix to uploaded images
- How to add image in rss?
- Does wp_get_attachment_image_src also work with non-image files?
- Rewrite inline image markup
- Console Browser says it cannot find a requested image that does not exist on my Website [closed]
- Display attached images as background-image css
- How to set a Background image in WordPress?
- Remove Additional image sizes created by theme
- Images don’t load erratically
- Weird encoded error when using wp_generate_attachment_metadata()
- Show Image Size as Dragging it Larger or Smaller
- Logo on the tab
- I want to rel=nofollow wordpress images
- Local install not loading template images but is loading everything else XAMPP
- How to get image name, mime type, width, height, file size from post custom field?
- How to automatically populate a gallery with images attached to posts of one category?
- How to edit caption for images and exclude it from excerption query?
- wordpress makes duplicate images of different size
- Add a span tag around image
- fitting the thumbnail image into a div
- Attachments without images
- Editing already up-loaded images
- Landing Page with HTML CSS JS and Images on wordpress
- Regenerate BIG threshold scaled images
- wp_insert_attachment() dupplicate attachment posts
- Image title replace with current date
- Change Image in Mobile Search Results
- WordPress Link To Image Missing Dropdown
- Is there a way to create referable automatic numbering in image captions?
- Why does wp_get_attachment_image_src return the wrong size, when the correct size exists?
- WooCommerce Variation Swatches and Photos – get attribute thumbnail
- Issues Adding a jQuery Image Slider
- set_post_thumbnail_size only working for width
- Getting the closest named image size from an array of dimensions
- link image file path embedded HTML
- Newly uploaded images are not updating in featured image
- How to attach post ID to image links in WordPress tinymce editor
- How to stop a post from publishing if the file upload is not a image/gif
- Troubles with code for upload a image
- get_post_meta returning broken path in image src
- Duplicate images in wordpress
- Custom WordPress Theme – No Slider(s) Images
- Get image from one page and show/add it on another page
- Replacing an Image gallery
- Images with excerpt function
- How do I get resized thumbnails?
- How do I embed an image at actual size?
- Display ajax preloader for large images within posts
- Why is WordPress loading a different sized post thumbnail?
- Uploading Full Size Image vs Resizing Before Upload
- Storing images on a local site
- Adding Multiple Images to Sidebar Through Dashboard
- Tried everything but Facebook share button won’t load the post thumbnail
- Set image dimension for WP_Customize_Image_Control images
- How to hide image alt text/caption in Visual Composer?
- Why some images are not allowed to be edited only for thumbnails?
- How to add a link to media file for every image inserted in content?
- How to get WordPress to resize images for srcset?
- How to give path to image in wordpress?
- Edit multiple posts featured image
- Make Jetpack CDN to filter/ignore images based on SRC [closed]
- images map on website not working
- WordPress + REST API + featured_image
- Some images not loading after changing IP on local wordpress install