First you need to get your attached image ID, how you get it depends on how you’re setting the image. The generic idea is that you get the attachment ID then you can simply use get_the_title( $attachment_id )
.
If you’re setting it as a Featured Image ( Post Thumbnail ) then you can use the following function to get the image ID: get_post_thumbnail_id( $post_id )
.
Related Posts:
- WP 4.4. responsive images browser choosing the “wrong” one
- Retina images – custom syntax for inserting images into post content
- show author image in posts
- Default Image Link Removal
- How to copy and paste a picture found on the web to wordpress easily
- Graphing libraries for WordPress [closed]
- add_image_sizes ignoring crop sizes and using proportion
- Dynamically add titles to post images if they are empty
- get_intermediate_image_sizes Get the Size Names but How Do I Get the Sizes?
- Cropping an image before inserting into a post
- custom image size with New Media Manager in wordpress 3.5
- Uploading images: ‘ø’ get replaced with ‘ø’
- SSL: How to make customizer images Protocol Relative in WordPress?
- Insert image in comment reply
- How to add qtranslate multi language support for media?
- Change the URL of an image from wp_get_attachment_image_src
- custom image dimensions (for gallery)
- Screenshot.png not showing up
- Include photos in WordPress blog posts without uploading to Media Library
- Is there any action/filter hook to use when an image gets edited in the editor?
- Images will not display, when I call them up with html in wordpress, just two blank small spaces [closed]
- Force minimum image size and aspect ratio when uploading images
- Changing default img html markup but not in admin back-end?
- Add srcset and sizes to older uploads?
- Change align classes for images
- Ho to add “Create Slider” option to default “Add Media” popup?
- Images in Blog List
- Divi Theme – images not showing on front page [closed]
- Edit image results in copies of file being created
- Images in Media aren’t showing, not broken
- Fixing image names for a site being restored
- Upload Image using wp_insert_attachment and file url don’t have file extension
- Export xml use/import images from theme directory
- Custom header tiling?
- Using featured img as div background
- Why are featured images sometimes cropped, and sometimes not
- Display an icon with get_post_meta?
- Include WooCommerce 2’s prettyphoto scripts on all site pages
- Get custom thumbnail sizes [duplicate]
- Where do I locate theme image files
- WordPress Facebook Open Graph plugin not working for 1 specific image [closed]
- Multiple post image, echo url (path of image)
- Make featured image be shareable across multiple pages?
- insert image alongwith with custom data via a frontend form
- Create a link to full-sized image attachment?
- Get image path : image is upload but not attached
- What sense makes medium_large_size_h => 0?
- Images not showing in media grid view (but showing in list view)
- How to test if there are no more previous or next image on attachment page?
- Force square image crop during upload?
- Emoticons not working on my site
- How to use getimagesize() of image upload?
- problem with add_size_image
- photo gallery implementation like tmz
- Graphics and Formatting Not Loading in WordPress on IIS
- How to Automatically import external images to Upload
- How to enlarge thumbnail on mouseover?
- Edit Page did not get refresh after update
- get_post_gallery with Gutenberg
- How to join Caption AND Description Meta Fields as one combined-caption in Image Block
- Fullscreen Page Background without Plugin [closed]
- Images not showing after wordpres update 5.6
- How to avoid images appear as post in google search?
- Images names not inserting in WordPress Database from Dynamic Add / Remove fields
- How to stop TinyMce from converting image url into ?
- How to automatically load an image inside the post, since it is present in uploads folder
- Generate links on all images in posts – is there a hook?
- Decide how Hero image appears on mobile
- Broken images/videos after migration – DIVI theme- works ok on Mac OS
- Which tools should I use for a gallery that uses an API and url for the path of the images?
- Uploaded images not showing properly using wordpress
- Can’t figure out how to get space around an image? [closed]
- How to best adjust images to a max content width of 490px?
- Set WordPress to Create different images format later, not during upload
- How might one programmatically set the link for all images in all posts?
- attachment.php & flexslider—linking thumbnail to specific image
- page displaying media caption shortcodes
- Display different Images depending on the current day
- How to associate an image with a term taxononmy and publish it on frontpage?
- How to add a credit line to a photo caption
- How can i make like this structure?
- Slider do not add alt attribute. Cant get alt attribute from a media library!
- Broken image URL
- Uploading Images for a section
- Some images suddenly not appearing
- Stop Attachment image names from taking top level permalink
- Image not showing in an archive page
- Set add_image_size() greater than content width in media box
- Media upload error
- Featured Image not displaying [closed]
- Remote Image (from URL) as Media Library element
- Theme using masonry layout script rendering overlaped images in Google Chrome [closed]
- Why are some SVG-images not visible in my footer?
- How To Get Feature Image from Blog in Same WordPress Multisite Blog on the Parent Blog?
- WPALLIMPORT Exporting images from repeater field [closed]
- What does WordPress media uploader do to image files on upload?
- Site header logo and parallax image on homepage do not display on iPhone
- image_get_intermediate_size always returns false
- Change of displayed images for webp versions
- Is is possible to append .webp to srcset images using wp_filter_content_tags()?