Title: Image url replace
Last modified: November 30, 2018

---

# Image url replace

 *  [testprojdev](https://wordpress.org/support/users/testprojdev/)
 * (@testprojdev)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/image-url-replace/)
 * How do i replace image url with s3 image url after image is uploaded?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [ianmjones](https://wordpress.org/support/users/ianmjones/)
 * (@ianmjones)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/image-url-replace/#post-10968385)
 * As long as you have “Rewrite Media URLs” turned on then any Media Library item
   URL in your content should get filtered to the S3 version during page render 
   for a visitor.
 *  [Kajuzi](https://wordpress.org/support/users/kajuzi/)
 * (@kajuzi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/image-url-replace/#post-11071729)
 * That’s what I have a problem with. I want the URLs to be rewritten in the DB.
   Is there a way of actually rewriting the image urls? I suspect the filter is 
   significantly slowing down the site.
    Is there an action hook that I can target
   with my own plugin to do this after this plugin has finished moving the file 
   to the S3 bucket?
 *  Plugin Contributor [ianmjones](https://wordpress.org/support/users/ianmjones/)
 * (@ianmjones)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/image-url-replace/#post-11076985)
 * The following is called after successful upload.
 * `do_action( 'as3cf_post_upload_attachment', $post_id, $provider_object );`
 * However, we strongly recommend you do **not** embed the remote URLs in your content,
   there’s very good reasons for why WP Offload Media moved away from doing exactly
   that.
 * [https://deliciousbrains.com/wp-offload-s3-1-2-released/](https://deliciousbrains.com/wp-offload-s3-1-2-released/)
 *  [Kajuzi](https://wordpress.org/support/users/kajuzi/)
 * (@kajuzi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/image-url-replace/#post-11077950)
 * Thank you very much for the help. That article was useful in telling me the reasons
   behind doing it the way you did. On the site I’m working on, the load time increased
   by close to 1000% so I’m going ahead with using remote URLs because I’m that 
   desperate. I don’t use private attachments so I guess I’ll be fine

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Image url replace’ is closed to new replies.

 * ![](https://ps.w.org/amazon-s3-and-cloudfront/assets/icon-256x256.jpg?rev=1809890)
 * [WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-s3-and-cloudfront/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Kajuzi](https://wordpress.org/support/users/kajuzi/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/image-url-replace/#post-11077950)
 * Status: not resolved