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
- audio tags no longer working
- wp media uploader and ID3 tags
- WordPress Media Uploader not displaying image that has just been uploaded
- What do you think about custom designed plugin/theme options UIs?
- Is it necessary to bump a plug-in’s version if you’re just updating the “Tested up to” attribute?
- Adding Widget form fields dynamically
- Custom action button in Gutenberg editor (post_submitbox_misc_actions – equivalent)
- add_action with a class method is causing fatal errors
- Include third party Javascript library which is not included in WordPress
- Update a Plugin while maintaining back compatibility: general
- get_the_post_thumbnail_url with an unregistered size
- Plugin development with unit tests
- Change WordPress.org hosted plugin readme.txt
- Problem with `wp_mail()`
- How to add meta boxes to the ‘Add new post’ screen?
- Media library storing files in uploads not folders within in uploads
- Translate strings not recognised in plugin
- WordPress add_admin_page not working even parameters are correct?
- How to use WP_Term with (menu) argument in the wp_nav_menu?
- Any problem in using native jquery ajax style instead of using admin-ajax.php?
- Communicate between plugins
- When to use add_settings_section vs just register_setting?
- How to customize login process
- Email verification for new users
- Is there a canonical way for a plugin to install a mu-plugin or drop-in?
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Looking for a way to insert PDF image preview in TinyMCE
- Reinitiate Gutenburg’s blocks using javascript
- Image in binary in the data to WordPress media library