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?
- how to get original image using wp_get_attachment_image_src
- How to delete resized (cropped) image uploads and prevent future resizing?
- After Moving a Site to Another Domain, All Images Are Lost
- Is there a hook which fires after all thumbnails are generated?
- Disable image attachment links
- Using Images in WordPress – Best Practices
- How to find attachment by it’s name?
- Prevent large image uploads
- Modifying an uploaded image with ‘wp_get_image_editor’ and ‘wp_handle_upload_prefilter’
- Prevent image upload unless exact size
- Use Media upload in custom widget on wordpress 3.5
- Theme Customiser Image Control
- Associate an existing image with a post
- 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?
- How to remove title attribute from gallery links and images
- How to increase media image scale limit?
- Get an image from url in front end submission form
- How do I delete thousands of unattached images?
- Add suffix to filename of uploaded images
- Re-process Images
- Uploading an image as featured image from frontend form
- How to upload images from my directory into my wordpress?
- could not upload image in media library
- Why images/photos after being uploaded to my wordpress site get slightly blurry?
- Why can I not view image attachment pages?
- Restrict Image Uploads to a Certain File Type
- Rename media files generated during upload
- add_image_size() to crop images into squares?
- Link to full size image or attachment page in photo theme
- add the post as canonical for attachment page wordpress
- wordpress media library shows empty images
- Upload .doc to blog
- How to remove Geo Tagging on image uploads, but not other EXIF data?
- media sideload image and Google Content
- image in my post disappeared after I upload website to remote server
- Pull images from the gallery
- Customizing the attachement page to show rest of all images in a gallery from post
- Disable all resizing and compression
- using media_sideload_image with a file from theme directory
- Is there any way to Integrate WordPress with Imgur for Image Hosting
- Blank upload.php page
- Rewrite all article pictures to link to file
- Upload image without media-upload [duplicate]
- Tinymce and uploading local pictures
- Unable to upload images to the Media Library. Getting this erron on the console wp-admin/async-upload.php 403 (Forbidden)
- Call to undefined function wp_generate_attachment_metadata()
- Images give 404 after changing default domain
- How to set uploaded image as featured image wordpress
- Create a post from every image in my media gallery
- Retrieve Image Attachments Getting Post Thumbnail Image First
- How to get image URL from media_sideload_image?
- How to change the value “uploaded to” in the media library (WordPress 4.0)
- Output posts attached images as thumbnails linked to full-size with lightbox class
- Making a parent directory writable by the server
- Indicate image sizes for upload by post type
- How to display a warning when an uploaded image is too small?
- Profile image does not upload
- Large uploaded images not resizing?
- Form File Upload Field generates multiple copies of Image Files (different sizes): Is this a WP feature or is this being done by the Plugin
- Custom image size not displaying with wp_get_attachment_image()
- Unset image sizes before images are uploaded
- Loading and Referencing Images
- unsharp thumbnails after uploading image
- How to delete original image file after upload and resize
- An error has occurred during the upload process in wordpress version 5.3.2
- An error has occurred during the upload process in wordpress 5.3.2
- Import images from old WordPress site into new site
- Widget media uploader doesn’t opens after widget save
- Getting the Select and Crop Functionality Using Custom Fields
- How to modify images during upload
- Only User Upload image Http Error
- Setting name of attachment URL
- Show title when inserting single images
- See the all uploaded images of a user as an admin
- Broken Media Library
- Utilise WP_Customize_Image_Control to only show image picker
- 3.5.x Theme Customize: Handling Custom Control Requests
- greater flexibility in targeting images attached to page
- Custom filename when pasting an image from clipboard
- Best Photoshop-WordPress workflow for editing images without re-upload [closed]
- My subdirectory sites images (except webP) are throwing to 404 page even they are exist
- Uncaught Error: Call to undefined function file_is_valid_image()
- Remove one srcset entry from wp_get_attachment_image