wp_get_attachment_image($post->ID, 'size-1');
The “post thumbnail” actually gets the featured image that is attached to the post. For an attachment, you want the attachment itself in a specific size, which isn’t the same as the featured image.
Related Posts:
- Enhance Media Manager for Gallery
- Change Media Uploader default directory
- How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS
- Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?
- Save image as featured image
- How to replicate Media Library “Add New” on Plugin Settings Page
- Get thumbnails with array sizes parameter
- upload image to wordpress media library failed for custom post type
- How to Fix HTTP Error When Uploading Images?
- Custom collection in media manager?
- Checking if a file is already in the Media Library
- Adding more options to the instance of an image. (Attachment Display Settings)
- Saving data-URI to media library
- Can I use the wp media uploader for my own plugin?
- Customizing the 3.5 “Add Media” popup (Backbone.js)
- Replace audio/video enclosure with player?
- Check for featured image in WP_Query
- Mediaelement.js feature doesn’t work
- Set first image (external) as featured image / thumbnail
- How can I view all WP generated thumbnails in Media Manager?
- WordPress Media mime type filter problem 4.0
- How to create thumbnail of different files?
- Bridge WordPress Media API with custom tinyMCE plugin [closed]
- How to get an image transferred via FTP or script to appear in Media Manager?
- Add Additional File Info (jpeg compression & file size) settings to Edit Images Screen
- Is it possible to modify the media library admin screen?
- Using the component outside the editor. select(‘core’) is null
- How to make programmatic image upload generate thumbnail and sizes?
- Add version query tag to all images
- What filter should I use to insert a button inside on Media>Add New
- How to enable sorting in custom media uploader in plugin
- Create a new post using rest api and save featured image using an external image url
- Overriding of the template for the Attachment “thumbnails” in the Media Grid isn’t working
- Capture mediaelement events
- Add Minimum Dimensions Text to Featured Image
- PowerPress mobile media player
- Upload multiple images and insert them into custom html code
- Redirect to another page using contact form 7? [closed]
- wp_editor add media button not working
- How to bring files from the upload directory to the media gallery?
- Run a function when new image is uploaded in media library
- Thumbnail images missing in WP media library
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- Cannot upload featured image to a custom post type
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- wp.media Uncaught TypeError: Cannot read properties of undefined (reading ‘state’)
- wp.media libary pdf type
- The URL of images on my website changed after being set as featured image
- How to create wordpress media library UI on plugin page
- wp.media gallery collection sometimes undefined
- Can’t load a script in my plugin page
- function add custom fields to media gallery
- unsharp thumbnails after uploading image
- Default media uploader is not showing in wordpress website
- After migrating media library is not showing thumbnails
- How to customize the size of Featured Images or Post Thumbnails in WordPress?
- WordPress Dropdown image select
- Changed media upload path for plugin, but generates error & shows wrong url
- How to destroy or dispose wordpress uploder/manager?
- Dynamic banner for use on external sites
- problem with blank page
- Creating custom Insert Media page
- Remove image in post when it’s removed in media library
- How do you filter get_media_items by mime type in a custom media upload tab?
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Pictures won’t display in media library and also won’t show preview when selected
- Open media box library from link
- WP is showing wrong image dimensions
- Why some images are not allowed to be edited only for thumbnails?
- Upload to a specific media folder created by FileBird Lite
- Load images from CDN and custom features to “Add Media” dialogue
- Looking for WordPress System Diagrams
- Check the Version of an Enqueue’d External Library
- How to Parse an Array of Elements in Gutenberg Block
- Custom rewrite rule serves content, but returns 404 error code
- How to edit mySQL wp_posts table from plugin php?
- Creating a Wordpess Plugin that writes data to a csv file. The data doesn’t show in the csv file?
- Why am I getting errors in product.thumbnails.php? [closed]
- Widget update function not saving values
- get_the_excerpt() is not returning an empty string when the_excerpt is blank?
- “Plugin could not be activated because it triggered a fatal error.”
- Does the order of sections in readme.txt matter?
- Add column in WP user but it goes wrong
- How to offset thumbnails to the center?
- Is file_get_contents() the only way for plugins reading local files OR does WP_Filesystem_Direct::get_contents() even work?
- Hook into Jetpacks Publicize without using a post type
- Checking a WordPress for OWASP top 10 vulnerabilities [closed]
- The Correct Way to Use Nonce Field without Settings API
- Import user data using CSV
- How to submit/upload data to database and in specific folder?
- OOP plugin not working
- Plugin Options not saving options and doesn’t work
- JQuery Slider – Similar to www.internetmarketinginc.com [closed]
- First page download plugin
- How to avoid conflict if a plugin already have included open library?
- post_results filter confused by pagination in sidebar and main section
- Multiple thumbnails and one gallery
- Fetch Custom Woocomerce filed data and check the data avialble in Wp-user table as nicname or username using function.php
- How to get locale within WP REST Request?
- How to add extra EXIF data when images are uploaded?