While it looks like this question has been asked before in some form, I still don't see a working solution.

I am using WP Offload Media Lite which moves uploaded files to an Amazon S3 and then applies a filter when the image is requested. Even though it's a safe way of going about it, I really don't like this filter system because now the site get ridiculously slow when I activate the plugin.

I have written a plugin that rewrites the URL for _wp_attached_file in the wp_postmeta table. Even though all these URLs have been rewritten to the S3 bucket full URLs ( hxxps://s3.amazonaws.com/url/to/image.ext ), in the media library they are still shown as residing on the local server ( hxxps:// ).

My Question: How do I make WordPress default to the S3 URL when it's rewriting the _wp_attached_file URL? It seems to be replacing everything before wp-content with hxxp:// which is the path to the site's files but is not the siteurl in the database;

The closest thing I've seen to a solution is a plugin that has not been updated in two major releases.

There is a chance I'm asking the wrong question here. Anything that avoids the site waiting for a filter to rewrite the URLs at load time is most likely welcome

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.