No, not strictly. You can check the source and see that there is no hook that would let you alter the URL.
You should also notice this interesting bit of code:
512 if ( $image = image_downsize($attachment_id, $size) )
513 return $image;
Follow the trail to here and you get this:
141 // plugins can use this to provide resize services
142 if ( $out = apply_filters( 'image_downsize', false, $id, $size ) )
143 return $out;
If you hook into image_downsize
…
add_filter(
'image_downsize',
function ($f,$id,$size) {
// your own downsize function
},
10,3
);
wp_get_attachment_image_src(4);
… you should be able to return any URL you want, but it means you will need to duplicate more or less the whole of image_downsize()
with changes of course.
Related Posts:
- Change Image URL to a CDN
- Host images only on CDN
- Jetpack’s photon causes local site to try and serve images from WordPress CDN [closed]
- How to configure sub-domain for images on Debian Apache VPS?
- Change media URL (images)
- Make Jetpack CDN to filter/ignore images based on SRC [closed]
- How to automatically add rounded corners to thumbnails?
- WP 4.4. responsive images browser choosing the “wrong” one
- Retina images – custom syntax for inserting images into post content
- show author image in posts
- Default Image Link Removal
- How to limit number of images being printer out in “Set Featured Image” pop up?
- Replace Woocommerce Images
- How to copy and paste a picture found on the web to wordpress easily
- Graphing libraries for WordPress [closed]
- Dynamically add titles to post images if they are empty
- Pasting images removes class attribute
- How can I make all gallery images to open in a new window?
- Crop image without scaling or resizing with add_image_size()
- Cropping an image before inserting into a post
- custom image size with New Media Manager in wordpress 3.5
- SSL: How to make customizer images Protocol Relative in WordPress?
- Is there a way to pull the first featured image in a loop and not all other featured images?
- How to add qtranslate multi language support for media?
- Is it possible to recover featured images after WordPress export/import
- how to stop generating different image sizes from parser
- Remove image classes from post thumbnail output
- alt tags of the images are not saving/emtpy
- SEO – Media File Name Updating
- Removing height and width from images with a caption
- Extracting gallery images in WordPress 3.5 on index.php
- How to get the url of an Image with id
- Image auto resize
- Retrieve images from parent site to child site using current shortcodes
- Add a background image for Custom Post Type archives page
- Background-image not showing? [closed]
- Help to upload post attachments from Ajax
- Scaling an image in a WordPress post
- Setup Featured image on all posts from thesis thesis_post_image custom field?
- Alter image meta fields in the Media Library
- How can I display an image description, from an image gallery?
- Stop WordPress from cropping images using url parameters
- How to get Image `alt` value from WordPress image attachment?
- Add clickable link on an image
- How do you import images from a URL in your post?
- Multiple post image, echo url (path of image)
- Make featured image be shareable across multiple pages?
- How do I get a smaller size of an avatar image
- When the new post which has no image published, save the specific image as the featured image ( by category )
- download link for uploaded images for wordpress
- How do I link a featured photo to it’s post?
- Images not showing in media grid view (but showing in list view)
- How to get the title of the random images from media library?
- How to indent pictures on WordPress blog? [closed]
- How to test if there are no more previous or next image on attachment page?
- Force square image crop during upload?
- Image and shortcode not showing in excerpt
- How to use getimagesize() of image upload?
- What is the plugin to import image from URL?
- problem with add_size_image
- photo gallery implementation like tmz
- How to enlarge thumbnail on mouseover?
- Edit Page did not get refresh after update
- User uploads image as “Featured Image” but WordPress resizes it?
- get_post_gallery with Gutenberg
- How to join Caption AND Description Meta Fields as one combined-caption in Image Block
- Hide Title tag on image Hover
- Images not showing after wordpres update 5.6
- How to get the best resolution of image from srcset
- How to avoid images appear as post in google search?
- Images names not inserting in WordPress Database from Dynamic Add / Remove fields
- Images do not show in the website, but they appear on new tab
- featured image in custom poste type (backend)
- Image Uploader Doesn’t Open Modal in Widget
- Image linking and lightbox
- Which tools should I use for a gallery that uses an API and url for the path of the images?
- Uploaded images not showing properly using wordpress
- Uploaded images appear broken in WP 4.4
- How to best adjust images to a max content width of 490px?
- Get attachment images does not return any attached images
- attachment.php & flexslider—linking thumbnail to specific image
- Add two images with Sweet Testimonials
- Breadcrumbs for Single Image page
- How to associate an image with a term taxononmy and publish it on frontpage?
- WordPress Images | How to get the cropped image?
- Import existing image as a single post
- How can i make like this structure?
- Slider do not add alt attribute. Cant get alt attribute from a media library!
- Broken image URL
- Stop Attachment image names from taking top level permalink
- Some images 404
- Media Library is not loading on grid view in admin panel
- Image not showing in an archive page
- How can I put pictures next to each other and how can I add a location? [closed]
- Media upload error
- Featured Image not displaying [closed]
- Site header logo and parallax image on homepage do not display on iPhone
- WP_Image_Editor – How to save the new size of the image in the sizes metadata
- Is is possible to append .webp to srcset images using wp_filter_content_tags()?
- Could a very long article slow down all website and wpadmin?