wp_get_attachment_url()
will only return url to original attachment file, this function only accepts attachment id as parameter.
Use wp_get_attachment_image_src()
or wp_get_attachment_image()
instead.
Related Posts:
- get attachment title based on attachment id
- Get Image Description
- Allow contributor role to upload images and not edit already published articles
- Why is wp_get_attachment_image_src not working with my custom size (add_image_size)
- How to give image source in wordpress page editor?
- How to wrap WordPress image captions inside H2, H3 tags?
- Set Custom Post feature image as og:image
- Making WordPress Gallery (.gallery-item) Responsive?
- Programatically creating image attachments from local URLs and setting featured image
- Width 100%: Aspect ratio of image
- Upload images using FTP and show them in media
- add_image_size() cropped only if width of the image matches or is higher
- Applying class to links around self hosted images embedded to posts/pages
- How to Make WordPress Default gallery responsive on mobile?
- Why does wordpress generate more thumbnails than the 3 standard sizes?
- Pulling Post Image Attachments in WordPress 3.9
- How to add an image for unit testing?
- including image assets in widget
- Link Featured Thumb to Attachment Page, If Possible
- Different captions for the same image in multiple galleries. Edit Image in Gallery locally
- Get all post media images via WP REST API
- Is there a shortcut to change bulk BMP images to JPG images in a site?
- Is 700,00 jpgs too many for a WordPress site.?
- Change the RSS feed image
- WordPress Post featured image URL in the header
- Add instructions to featured image
- How do I get more image editing options in the admin?
- HTTP Error when uploading files above 7mb unless using GD Image Editor
- Question about add_image_size()
- Image resize using url parmater
- How to display / include a specific jpg on a page
- Grab remote images and update links in existing posts
- Store Snapshot created via wordpress to use with lightbox
- Get image URL after image created from canvas and sent to WP uploads with AJAX
- How can I use cached images in an AJAX response?
- Can’t get images to align with Gutenberg editor
- Show image EXIF info
- Retrieve image from content, assign it as a featured, and then remove it from the content
- Custom Loop, Match Category with Page: How to display post featured image?
- Modifying the HTML Output of Inserted Images
- Include an image within auto the_excerpt?
- Google verification challenge with file location
- How to check for images before echo
- Remove height attribute from wp_get_attachment
- How do I retrieve an image’s width and height using Advanced Custom Fields?
- wp get attachment image always gives me thumbnail
- Two “the_excerpt” questions
- Images are not showing after moving WordPress installation from server to localhost?
- Images are not showing up in “Uploaded to this post”
- Right click© images: protection
- Cache DB queries result
- Remove “%” from strings in serialized arrays in wp_postmeta
- Images not found after migrating WordPress website
- Adding srcset to an image in ajax
- Error uploading images in wordpress
- Disable Media File Image Link On Mobile Devices
- Set two default featured images
- Automatically generate missing images
- Apply nextgen-gallery lightbox effect [closed]
- VT-resize (great alternative to timthumb) : Errors cropping (litespeed, centos 6.3)
- Allow admin roles to add images to comment replies
- Calling two images at a time? A better way?
- Page speed error: “serve scaled images”
- Image Captions Have a 10px Extra Margin, And It’s Not CSS? [duplicate]
- Image.php Problem – Post Images Not Displaying In It
- View photo album without having to scroll down for each picture
- How can i sorting and display image order by siz in media library?
- x2 images for retina?
- i want to change URL of WordPress image or rewrite in runtime
- Load url image full size in thumbnail, medium, large size
- Non-existent child page URLs redirects to the image attachment URL instead of throwing 404
- WP Large Images crash page
- Images not loading on wordpress.org site
- WordPress can’t detect any thumbnails size?
- Remove image border in twentyeleven theme [closed]
- second featured post not displaying on page [closed]
- How to display posts with images in fullscreen slider
- WordPress not choosing the right image from srcset
- how to remove / hide ‘featured image’ option from side menu
- 403 Forbidden when accessing image in wordpress
- Why doesn’t WordPress make thumbnails for videos?
- For what does WP generate Thumbnails?
- Images are not shown
- Adding multiple images on my site – without using plugins [closed]
- Remove the height limit on wordpress 3.4.2
- Missing Images in Uploads Directory (Server Only)
- > added to images link in WordPress
- Image media upload problem in page editing modus?
- Thumbs and pictures not showing anymore
- Is there a good way to use CMS images with CSS
- Upload image from other server without resize?
- How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices
- Forcing absolute src links in the RSS feed
- where is images/image.jpg?
- Using the on-board image editor for featured images: edits are not being used
- change with CSS the color of an svg background image set with “background-image: url()”
- Img alt tag showing different value then entered
- What type to upload image within theme options?
- I am having trouble displaying an image at the top of a widget area [closed]
- Can’t upload svg files in WordPress