WP Offload Media plugin rewriting page CSS URLs

We are using the WP Offload Media plugin with X theme. I have noticed when adding page specific CSS for background images, when the page is saved in Cornerstone, the URLs have been rewritten to the local URLs instead of the S3.

For Example: Adding the following to Page CSS -

.some-class{background-image: url('https://domain.s3.amazonaws.com/wp-content/uploads/2021/01/28134917/nameofimage-1024x576.jpg')}

upon saving the page and refreshing the content I see

.some-class{background-image: url('https://domain.com/wp-content/uploads/2021/01/nameofimage-1024x576.jpg')}

From what I have read in other form threads, there is a filter in Offload Media that runs upon save and looks for URLs from the media library and replaces them with the S3 URL.

I have Rewrite Media URLs and Remove Files From Server selected in the plugin.

I am not having any issues with images in the main page, just images referenced in the css.

My question is why would the URL replacement be working backwards for URLS found in page or global CSS? Is there a filter in X theme that is changing it back or not allowing the plugin’s filter to fire correctly upon page save?

Hi @getabsolute,

Thanks for reaching out!

Would you mind sharing your website credentials so that we can confirm? To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thank you.

Hi @getabsolute,

Thanks for providing all the details!

Regretfully, I wasn’t able to log in to your website due to security purposes. I suggest that you disable your Wordfence plugin in the meantime so that we can check on it.

Thank you.

Wordfence has been temporarily disabled.

Hello @getabsolute

I tried to access your site’s dashboard but unfortunately, the given credentials are not working. Please recheck and send us again.


Hello @getabsolute,

I was able to log in and replicated the issue. I suspect that this is a conflict with the plugin or a bug in the release. I’ve submitted this to our issue tracker so the developers will be made aware of it.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.