Calling the_content from within attachment.php will bring you the Attachment Description.
Put the code below on your page and see what you can get from within attachment.php file:
while ( have_posts() ) : the_post();
/**
* @link https://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata#Related
*/
$data = array(
get_the_ID(), // Gets att ID.
get_permalink(), // Gets att page link.
get_the_title(), // Gets att title.
get_the_content(), // Gets att description.
wp_get_attachment_metadata(), // Gets att metadata.
);
var_dump( $data );
endwhile;
Also, you might want to take a look at https://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata#Related and see other functions that will perhaps be useful for you.
Related Posts:
- Adding a custom image upload size and making it selected by default?
- How to register images uploaded via FTP in media library?
- How to upload imagick resource to media in wordpress
- WordPress media upload “HTTP error”
- Adding a querystring to an image URL when clicking ‘insert into post’?
- How to get media objects
- WordPress automatically adds links to uploaded images
- Get featured image with custom size outside WordPress
- Convert all uploaded PNG files to PNG-8 format
- Edit Image/Image Details – Replace button missing
- How to automatically convert images to WebP on WordPress?
- Upload images to remote server
- Uploading media with the REST API
- Remove “Insert from URL” link in Media upload – WP 3.5
- Which filters or actions to use after a media upload and delete?
- Decrease file size upload in Media
- Hide custom image sizes from media library
- Change the filename format of saved featured images
- Hide old attachments from wp media library
- Failed media upload: “The uploaded file was only partially uploaded.”
- Create Image Uploader for Widget
- Using file_exists to check file in Uploads
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Rename image uploads with width in filename
- Admin Media grid view images won’t load
- Debugging upload problem: What part of WP does actual image-resizing?
- How to resize image on client-side before upload?
- Add custom image sizes to media uploader
- Upload images and attachments from frontend form
- Image upload via FTP to wordpress media library
- How do I get images (with a thumbnail preview) to show in search results?
- Different upload path per file type
- Site icons with alpha channel for self-hosted WordPress blog network
- Validate Uploaded Image using WordPress’ Built-in Functions?
- Get most recent media upload
- Convert all images to PNG on file upload
- HTTP Error when uploading files above 7mb unless using GD Image Editor
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- Can’t upload image using media_sideload_image
- Upload multiple images to a Woocomerce product
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- Enable custom logo upload if logo is not in header
- Images uploaded to the media library has strange colors. However, in the edit screen the color is ok
- How do I get around “Sorry, this file type is not permitted for security reasons”?
- Redirect to another page using contact form 7? [closed]
- WordPress function when file is uploaded, deleted or edited
- zip unzip attachments in wordpress
- Get images attached to a specific page
- Is there a way in WordPress to convert images to WebP without a plugin?
- Images Uploaded saving onto older/previous year folders
- Convert canvas to image and upload image to server
- Custom upload folder
- WordPress İmages Upload & Delete Error
- How to Make Thumbnail of Post Stay Animated
- How to decrease the max file upload size without using php.ini or htaccess?
- Some problems in custom widget
- Checking page before applying image restrictions while uploading
- Change image data durgin upload
- Hook on file upload
- WordPress append -1 to the image name
- WordPress loading all local images from specific directory?
- unsharp thumbnails after uploading image
- wp_delete_attachment not working with multiple values
- Renaming “Expand Details” within “Add Media”
- Save the outputted image into the Media Library, with a different filename and extension
- How to resize an image server-side before upload?
- Missing Images in Uploads Directory (Server Only)
- Name Input from widget displays Sidebar name instead of saved data
- show/hide attachments
- Broken Media Library
- Can’t upload files
- Media Library is not loading on grid view in admin panel
- Blurry Images WordPress 5.8.1
- An automatic way to crop images of different sizes
- Generate and upload screenshot as featured image for user-submitted post
- Changing upload directory temporarily
- Restricting Image Upload Sizes using ‘wp_handle_upload_prefilter’ – Stuck media progress bar when Featured Image?
- Convert base64 string to WordPress attachment uploads multiple images instead of a single one
- Reject upload of wrong-sized images using the Media Uploader
- How do i upload an image and return the image id?
- Adding graphics to 404.php page
- Strip Image Classes from HTML Output
- Additional image sizes are not being generated
- Media library storing files in uploads not folders within in uploads
- Getting media library popup in custom plugin admin page
- Can I stop wordpress generating media sizes
- How to restrict wp generate attachment metadata() to certain intermediate image sizes
- Set the background to a default image if there isn’t a specified “featured image”
- PDF file randomly breaks upon upload
- Scrape external webpage for first image and add it to new post
- Which function crops images in wordpress?
- Images are not showing up in “Uploaded to this post”
- A link (not in the post) to download a specific PDF file
- Front end file upload returning wrong attachment url
- How to create an unordered list of images separate from the content
- Attaching an upload to a user
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Is custom behaviour possible when asynchronously uploading?
- Understanding responsive imagery
- “Media Library” shows as empty, despite images being present