$is = get_children("post_parent=$id&post_type=attachment&post_mime_type=image");
foreach($is as $i) {
$url = wp_get_attachment_image_src($i->ID, 'full');
$caption = $i->post_title);
}
$id is the id of your post. See http://codex.wordpress.org/Function_Reference/get_children
Related Posts:
- Upload images to remote server
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- How do i upload an image and return the image id?
- Different upload path per file type
- 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?
- Handling image uploads without thickbox
- Images uploaded to the media library has strange colors. However, in the edit screen the color is ok
- Is there a way in WordPress to convert images to WebP without a plugin?
- WordPress Attachments with old images
- WordPress append -1 to the image name
- unsharp thumbnails after uploading image
- Missing Images in Uploads Directory (Server Only)
- Broken Media Library
- Media Library is not loading on grid view in admin panel
- Blurry Images WordPress 5.8.1
- How to Fix HTTP Error When Uploading Images?
- Programmatically adding images to media library
- How to delete resized (cropped) image uploads and prevent future resizing?
- Which filters or actions to use after a media upload and delete?
- Media Upload Folder – how to manage
- How can I hide media library images from general users?
- Get attachment ID of author_meta image – Attachment Metadata
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- Alter media caption/description conflict in WordPress?
- Restrict the number of images to upload per post
- WordPress function: limit size, only jpg, jpeg, limit of uploaded files per account
- How to upload image without post ID using the new media uploader?
- Rename attachments during upload
- Uploading images to Media Library fails with Memory Exhausted
- Edit image preview is not displayed
- How to add a media with PHP
- Uploading images: ‘ø’ get replaced with ‘ø’
- Regenerate missing _wp_attachment_metadata
- How to make programmatic image upload generate thumbnail and sizes?
- Best way to strip character entities (%20 etc)
- What’s the best “insert all images” plugin?
- Is there a way to get attachment data?
- Site icons with alpha channel for self-hosted WordPress blog network
- Rename media files generated during upload
- wordpress media library shows empty images
- media_sideload_image with rewritten urls?
- How to order images in a post in WordPress 3.3?
- Change WordPress Media Manager
- image in my post disappeared after I upload website to remote server
- Pull images from the gallery
- How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product
- WordPress automatically downscaled images larger that original
- How to open default wp image editor screen dynamically?
- Is it possible to split Default WP Media directory to multiple Folder/Subdomain?
- Searching for any images in media library displays “no media found”
- Ho to add “Create Slider” option to default “Add Media” popup?
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- Auto delete attachments that are older than x days
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- How to get file URL from media library
- Change wp-content/uploads to uploads/%postname%/%image%
- Change media URL (images)
- Uploaded images not displaying in network site
- Does wp_get_attachment_image_src also work with non-image files?
- Why does WP allow to view and media item as a page
- How to limit the number of images displayed in the media window?
- Upload media only to DB
- Images are not showing up in “Uploaded to this post”
- Create a post from every image in my media gallery
- WordPress Creates Unused (Unregistered) Image Sizes
- Images don’t update after being edited
- Change Image folder Locations
- Auto delete pictures in media library by age
- Some Images Disappeared from Media Library?
- Disable image rename on upload
- How can i identify media uploaded to my website that is not being used anywhere anymore?
- image URL changed in wordpress
- Attachments without images
- Serving Images from subdomain in wordpress
- User uploads image as “Featured Image” but WordPress resizes it?
- cant upload media/pictures to my wordpress site, cant upload anything to my database
- Could creation of various image sizes cause slow form submission response?
- Updated wordpress missing image upload area
- Post-processing of the image failed
- Adding attachment custom field metadata to TinyMCE tag
- How to disable post-thumbnail from generation?
- Broken images in media library
- Images are not getting uploaded
- Unable to delete images in Media Library
- Troubles with code for upload a image
- After I upload a file to library its name converted to dashes
- Edit image itself
- controlling whether upload is attached to post or not
- Assign one featured image to multiple posts?
- Transfered live site to new server and images are not showing
- Limit files uploaded per folder
- Upload unnattached image from frontend
- My image rotate 90 degree
- How do I change a Themes Header Image?
- Why some images are not allowed to be edited only for thumbnails?
- What does WordPress media uploader do to image files on upload?
- How can I use an image from an external source without uploading it to the media library
- How to get WordPress to resize images for srcset?
- Uploading media to wordpress API with C# HttpClient