No, wp_get_attachment_image_src()
is for image files only. For non-image files, you can use get_attached_file()
to get the full filesystem path to the attachment file. And to get the full URL, you can use wp_get_attachment_url()
.
Related Posts:
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Get attachment ID of author_meta image – Attachment Metadata
- How do i upload an image and return the image id?
- How to upload image without post ID using the new media uploader?
- Rename attachments during upload
- media_sideload_image with rewritten urls?
- Handling image uploads without thickbox
- Auto delete attachments that are older than x days
- Get images attached to a specific page
- WordPress Creates Unused (Unregistered) Image Sizes
- How to disable post-thumbnail from generation?
- Troubles with code for upload a image
- After I upload a file to library its name converted to dashes
- Upload unnattached image from frontend
- How to get WordPress to resize images for srcset?
- Image Upload from URL
- Programmatically adding images to media library
- How does WP media uploader create the 3 different sized images, and how can I duplicate it
- Programmatically get images by URL and save in uploads folder
- how to get original image using wp_get_attachment_image_src
- Can I attach image to post without adding it to post?
- Upload images to remote server
- Each custom image size in custom upload directory?
- How to delete resized (cropped) image uploads and prevent future resizing?
- Download an image from a webpage to the default uploads folder
- After Moving a Site to Another Domain, All Images Are Lost
- Allow contributor role to upload images and not edit already published articles
- Is there a hook which fires after all thumbnails are generated?
- Disable image attachment links
- wp_get_attachment_image_src and server path
- Limit image resolution on upload
- Rename files on upload
- How to insert images into posts without using Add Media dialog
- Using Images in WordPress – Best Practices
- How to find attachment by it’s name?
- Media Upload Folder – how to manage
- Prevent large image uploads
- Modifying an uploaded image with ‘wp_get_image_editor’ and ‘wp_handle_upload_prefilter’
- Upload multiple images in a custom metabox
- How do I delete all generated images from my server except those currently used in posts
- Insert an image into a post by API
- Function to call the attachment image from post
- hook into completed image upload filter
- Saving the pre-sanitized filename of an attachment as the Title or Caption
- Prevent image upload unless exact size
- getting uploaded SVG dimensions on front-end
- Adding upload button in metabox
- Use Media upload in custom widget on wordpress 3.5
- Theme Customiser Image Control
- Automating a Daily Picture Blog?
- How can I hide media library images from general users?
- How to copy and paste a picture found on the web to wordpress easily
- Images uploading to wrong folder
- Associate an existing image with a post
- Replace all of post’s image URLs with upload directory URLs
- Programatically creating image attachments from local URLs and setting featured image
- How can I add the “Use as featured image” to a custom metabox?
- Image resize with image url
- How can you upload an image from within a settings page?
- Get Attachment ID from URL [duplicate]
- Alter media caption/description conflict in WordPress?
- How to remove title attribute from gallery links and images
- Separate attachment images from post loop
- Restrict the number of images to upload per post
- Automatically wrap post image in div
- How to display a shortcode caption somewhere other than the_content
- WordPress function: limit size, only jpg, jpeg, limit of uploaded files per account
- How to increase media image scale limit?
- copy attachment title to description and alt text
- Frontend image uploading from edit profile page. (goldenapples)
- Get an image from url in front end submission form
- Open the attachment details modal
- How to Display an Image Uploaded through a Meta Box in a Template?
- How do I delete thousands of unattached images?
- Allowing post attachments without allowing to insert in text
- Applying class to links around self hosted images embedded to posts/pages
- HTTP Error when trying to upload image
- Filter to modify post_title after image upload?
- Add suffix to filename of uploaded images
- Regex to turn embedded images in to attachments
- Re-process Images
- Uploading an image as featured image from frontend form
- Show prev and next post links for parent post of current image in attachment page?
- How to upload images from my directory into my wordpress?
- could not upload image in media library
- Pulling Post Image Attachments in WordPress 3.9
- Automatically Add Caption in image
- Uploading images to Media Library fails with Memory Exhausted
- Edit image preview is not displayed
- How to add a media with PHP
- When Uploading JPEGs, Does WordPress Compress the Original Image?
- Rename image during upload using date and time stamp?
- Uploading images: ‘ø’ get replaced with ‘ø’
- Link Featured Thumb to Attachment Page, If Possible
- Why images/photos after being uploaded to my wordpress site get slightly blurry?
- How to disable the suffix “-scaled” which is being added at the end of each uploaded image?
- Regenerate missing _wp_attachment_metadata
- SSL: How to make customizer images Protocol Relative in WordPress?
- Make alt text required when setting a featured image
- Insert image in comment reply