I haven’t actually tested this, but came across the following code on my travels. Might this help?
get_post_meta($attachment_id, '_wp_attachment_image_alt', true)
Related Posts:
- wp_delete_attachment doesn’t delete image files / doesn’t work
- How to Fix HTTP Error When Uploading Images?
- How can I bulk delete media and attachments using WP-CLI?
- Uploading Multiple Attachments From Front-End With A Description
- media_sideload_image file name?
- Get all posts (of any post type) an attachment is used in
- Password protect some uploaded files, so only logged-in users can view them
- Unattaching unlinked images
- WordPress media uploader – upload tabs not hiding
- problem in uploading attachment to custom directory
- Get images attached to a specific page
- Upload multiple image with media_handle_upload with multiple file field [duplicate]
- Can’t upload format files on media library
- Media Library Mess After FTP … /uploads
- Adding attachment custom field metadata to TinyMCE tag
- Organizing the Media Library for Cleanup
- controlling whether upload is attached to post or not
- How can I add a Description column to the media library browser screen?
- How to Protect Uploads, if User is not Logged In?
- How to manage attachment relationships for specific posts in WP 3.5+
- Extend Media Library
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- Upload images to remote server
- How to trigger a refresh in the media modal
- How to show all available images in WP’s media library when using the Polylang plugin?
- Programmatically adding images to the media library with wp_generate_attachment_metadata randomly fails
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Which filters or actions to use after a media upload and delete?
- Remote upload file to server B
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- Can I use the wp media uploader for my own plugin?
- How to wp_upload_bits() to a sub-folder?
- Change Media Uploader default directory
- Using Images in WordPress – Best Practices
- display image size in media library screen
- How to hide media uploads by other users in the Media menu?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Where do the favicons for Media Files come from
- Expanding new Media Uploader in WordPress 3.5
- Limit Media Library to Given Folder
- complex restriction of items in media library
- Edit image / Delete image link
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How to call WP3.5 Media Library manager?
- Creating a metabox to upload multiple images, Ignoring The Featured Image
- How to get all files inserted (but not attached) to a post
- How to single click to download image in single post
- Attach Files Metabox
- How to protect uploads in multisite if user is not logged in?
- delete attachment from front end
- Append button to WordPress Image Details modal
- Show Post ID in “Find Posts or Pages” box in Media Library?
- Saving Custom Field in Attachment Window in WordPress 3.5
- How to add media from front-end to an existing post?
- Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
- Ignore a filter on the media library
- Delete attachments from Front end
- Creating a multi-file upload form on the front end for attachments
- How do i upload an image and return the image id?
- WP3.5 Media Uploader – how to make it accept multiple images?
- Get attachments (get_posts) and WP 3.5 new uploader
- exposing attachment uploading to the front end — delicate
- Automatically wrap post image in div
- Gel all image from certain post type
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Restricting access to files within a specific folder [duplicate]
- How to upload image from front end and save in media library?
- Can i hide the attachments from media which I uploaded from front end?
- Get the attachment URL on single.php
- Media items hogging pretty permalinks
- Upload images and attachments from frontend form
- WordPress media upload “HTTP error”
- How to disable WordPress Media resize different size version?
- How to delete orphan attachments?
- Get attachments by user
- How to count media attachments?
- Get url from file uploaded in Media Library
- Restrict file types in the uploader of a wp.media frame
- How do I go straight to “Edit More Details” when clicking on an item in the media library?
- Media library storing files in uploads not folders within in uploads
- Adding File Extensions to Attachment Page Permalinks
- Add select field to media uploader that adds a class to the image
- Getting ID from ajax response of async-upload.php
- What’s the best “insert all images” plugin?
- How to add multiple checkbox elements to media attachments?
- How to host different file formats/types for a media attachment without creating multiple attachments?
- How to re-arrange media uploaded using : media_handle_upload() as per year / month
- How to stop unlink images when remove a site or user
- Perform a custom (bulk) action in media view
- How to import 55k images (uploaded via FTP) into WordPress Media libary? [closed]
- Different upload path per file type
- How to make a customized “Create Gallery” tab in the ‘Add Media’ window?
- Hide upload image fields for the different media upload popups
- rename attachments based on parent-post-title on upload
- Site icons with alpha channel for self-hosted WordPress blog network
- Removing width and height attributes from wp-get-attachment
- Insert attachment ID in custom field from media uploader
- How do I get allowed Media Library upload file extension list?
- Displaying Post Attachment(s) at Top of single.php
- Cannot upload .mp3 file to wordpress media