You can hook into the output and modify the URL there.
add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 5 );
function my_post_image_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
$upload_dir = wp_upload_dir();
$base_url = $upload_dir['baseurl'];
// Change the default upload directory to AWS Bucket link
$AWSBucket="http://s3.amazonaws.com/bucket";
$html = str_replace($base_url, $AWSBucket, $html);
return $html;
}
Output the image
echo get_the_post_thumbnail ();
Reference:
Related Posts:
- No Thumbnails Generated
- How to upload files straight to S3 without using local storage? [closed]
- Upload post thumbnail from the front end
- Differentiate Featured Image from Post Images upon Upload
- Multisite, upload images directly to Amazon S3
- Convert uploaded PNG to JPEG automatically
- Insert Featured image from Feed
- Upload image from a URL and assign it as a Featured Image to a Custom Post Type?
- insert post & Upload post thumbnail from the front end using ajax
- Regenerate thumbnails unexpected resolution (96 x 96)
- How To install AWS SDK for PHP in wordpress?
- Thumbnails produce unwanted gray pixels on white background [closed]
- add_image_size() and uploading the exact size leaves 1×1 image in uploads
- Uploading images on front end doesn’t generate thumbnail sizes
- Media Gallery Upload photo incorrect way like glitch
- Attach Thumbnail Generated from Video Upload as Featured Image for the Video
- Upload featured image from front end using media-upload.php
- Original image not saving?
- What is the URL pattern for image thumbnails + sizes?
- Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio
- Cropping thumbnails to specific dimensions on front end post
- Bug: Deleting file, then uploading same file again places file in an old month folder
- Removing extra large generated images disables all crops
- How can i link my featured image to be clicked and the file will be downloaded
- Redimension thumbnail crop without creating new images
- Featured image to grayscale with PHP imagefilter – which hook to use?
- get the post thumbnail returns the full size
- Is it possible to upload multiple images via Media Library tab in Thickbox I’ve created?
- Make thumbnail from uploaded image without plugin
- Set featured link not showing
- Is there a way to force Featured image to show as attachement?
- Question regarding the file path for media_sideload_image and wp_upload_dir()
- Saving Media – Which Hook is Fired?
- Is it possible to allow zip files to be uploaded in WordPress?
- Settings in ‘Media > Settings’ is ignored when inserting images
- using media uploader to select image of specific size, enforce cropper
- Change URLs for static content
- How to save media files under “http://example.com/custom_folder” for a specific page
- HTTP Error when uploading images
- File upload from front-end form (as attachment) not working
- Media uploader not work properly [closed]
- “HTTP error” randomly on image uploads
- View content from uploaded file in editor
- How to rewrite WordPress uploads folder to another folder using htaccess
- Bug when uploading pictures with international characters?
- How to remove some media upload icons from post editor?
- wp_editor in front end not working
- Upload file without attaching it to a POST
- Ajax image upload with media_handle_upload and form.js
- WooCommerce Images are uploading to the server but not attaching
- Why would media_sideload_image() not work locally?
- Media upload on WordPress changes title of image
- Upload file programmatically
- move_uploaded_file() not working on wordpress front end
- Remove upload file types filter for admin
- Prevent small image sizes from being uploaded
- Front-End Social photo upload [closed]
- Protecting uploads not working
- How to replace images?
- WordPress Uploads Directory not using dates in links
- Limit image upload
- What is the way to add additional fields to attachments in 3.5+?
- Is there any good way to use SVN for uploads directory?
- Uploaded images do not show on localhost
- Uploading PDF file and providing download links to them
- How to load attachment in media library for current user?
- Storing WordPress Media Library Uploaded files onto a separate domain
- Error: The uploaded file exceeds the upload_max_filesize directive in php.ini [duplicate]
- Creating a podcast directory site – how to allow user to upload “large” files?
- get array of files in uploads dir
- how to disable WordPress flash up-loader?
- Better solution for managing media attachments with `wp_editor()`?
- Upload PDF and other files from the Front-End
- How to disable image thumbnails from media manager but not post media uploader?
- Do custom post type (CPT) attachments/media store the parent post ID?
- Certain functions are not available when executed with wp_schedule_event
- Get uploaded video URL
- How Do I Change the File Permission For Uploaded Files in WordPress?
- WordPress media has all disappeared on wp-admin but still on the server
- How to delete original image file after upload and resize
- image not display in media library and thumbnail not display in post
- Using unzip_file() to get contents of file
- How to upload .tex files in wordpress?
- An error occurred in the upload. Please try again later
- Using Gravity Forms to upload media into library, then attach to post
- Some images not appearing after switching from AWS S3 back to local
- Why I am not able to upload media files?
- Store uploads on an external server?
- Force relative path in media library for LAN deployment
- Making Site A Use Site B’s wp-content Folder
- Limit number of uploaded attachments of specific context
- increase maximum upload file
- How i can upload images to another folder?
- make default upload folder year/month/day wordpress without plugin [duplicate]
- Display Image Upload from Contact Form 7 on Redirect Page [closed]
- media_handle_sideload() fails
- How to upload and add images to the existing post from the front-end with admin approval which is posted by other user
- Auto shortlink for file uploads
- Obtaining detailed error information from Media file upload process
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)