You might have better luck using wp_get_attachment_url( $id ) rather than wp_get_attachment_image(). Take a look at the WordPress codex for the call.
Related Posts:
- Adding width and height to wp_get_attachment_image_src
- How To Retrieve An Image Attachment’s Alt Text?
- Creating an Image-Centric Custom Post Type?
- getting attachement images src and add classes
- Check if post has attachments (not image)
- Validate alt text for attachments?
- Applying automatic link class to images embedded to posts
- delete attachment from front end
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- get post attachments of a particular size
- Change image link: wp_get_attachment_link
- Automatically wrap post image in div
- Making images from single.php pointing to an attachment .php template
- How do I delete thousands of unattached images?
- wp_get_attachment_image_src always returns false
- Exact image sizes
- How to add a rel attribute to images that contains their categories?
- Get the size (size in Kb or MB) of an featured image?
- Importing media medium setting image gallery / image attachments
- query attachment images … if no attachments -> get attachments of parent page?
- How to add multiple checkbox elements to media attachments?
- Edit default image attachment size
- Change code to display image attachment page
- Attachment 0×0 size error [closed]
- Add image attachment to post via coding?
- How to retrieve alt attribute for an attachment (uploaded image)?
- Get post attachment images dimension and use in embed code
- use wp_get_attachment_image() to show attachments
- Displaying Post Attachment(s) at Top of single.php
- Get the bare URL for an attachment
- Display attachment resolution size
- How to check if there is image title, caption, description?
- How to remove attachments size attribute [duplicate]
- How to redirect ‘file url’ to ‘post url’ i.e. in attachment.php
- Check what attached image size is used
- How do I get all attachments that are used in the current post, not just the children?
- Clean up images, delete unused image sizes attached to a post type
- Delete associated thumbnails when calling wp_delete_attachment
- What will happen if I delete all my attachment type posts from database?
- Get title of post image is attached to
- Correct attachment size
- Post Gallery list attachments except the one used as post thumbnail
- Get image attachment to a post outside the loop?
- How do I intercept and modify the functionality of wp_get_attachment_image()?
- Unable to get wp_get_attachment_url to show
- Get Attachment Image Class by attachment id
- Possible to add “Even/Odd Classes” to image attachments via wp_get_attachment_image?
- changing the default picture size link url
- Get an image from the media library. Struggling with the code?
- How to view exact image dimensions of a media in Admin view?
- Filter not applied to all image sizes
- wp_get_attachment_image_src calling wrong location
- wp_delete_attachment doesn’t delete image files / doesn’t work
- Get attachment URL from attachment Link in WordPress
- Display setting ‘size’ not available in image settings modal
- Get “Image CSS Class” value from the Advanced Options section
- Hide Image Container if No Image Attachments
- Incomplete attachment page
- How to retrieve “custom url” from image attachment in wordpress
- Retreive tags from attached post for media on page
- list of attachments: wp_get_attachment_link works, wp_get_attachment_image does not
- Adding thumbnails for non-image attachments
- What is the most efficient way to retrieve a group of image URL’s from different attachment ID’s of a specific crop size?
- get_image_tag filter not working
- Change attachment inside the_content using filters
- Apply nextgen-gallery lightbox effect [closed]
- 500 internal error at wp_generate_attachment_metadata
- Delete child post and attachment links to parent post
- Trying to set specific image dimensions and crop with ACF
- How can I return multiple image attachments with wp_get_attachment_image_src
- What is the best way to associate multiple images to one page?
- Undoing define( ‘UPLOADS’, ”.’files’ ); to repoint to “wp-content/uploads” folder
- How can i catch (with get_posts) attachment file (pdf, images) from a post when i have only inserted it from media library and it isn’t upload for it?
- Remove attachment from database
- How to pass on a value as parameter via url to another page
- Attaching images to posts manually (i.e. with custom code, without the use of an API)
- Featured Images for Tags?
- How to get the cropped image from media library?
- has_excerpt yields true but no post_excerpt when retrieved
- Automatically deactivate link for attachments
- How to attach images that I “insert from url” into the post?
- How to let a role handle media without post permissions
- Hiding or removing file extension displayed in HTML on attachment page
- After changing permalink structure, How to redirect attachment url to old parent post url
- WordPress Gallery Permalink Structure Displaying Incorrectly
- Upload image and assign it’s id to post
- Use full size images in a specific gallery
- How to get the next and previous image title from attachment or gallery?
- Display Audio Attachment URL
- Random Characters in the end of every image url in post
- WP_Query: attachment image in “full” size?
- How to set order for attachment form field?
- Will wp_get_attachment_metadata display PDF metadata (eg: keyword, author, description)?
- Can’t sort get_posts by post_mime_type
- Excluding post thumbnail from the attachment.php when using wordpress gallery
- Display a post attachment depending on the caption
- How to get thumbnail from post attachment in this loop
- Getting attachment post using wp_get_attachment_link
- How do I get just the title from wp_get_attachment_image
- How to replace post image url before posting using api?