• testprojdev

    (@testprojdev)


    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

    (@ianmjones)

    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.

    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

    (@ianmjones)

    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/

    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.