Support » Plugin: WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage » Rewrite broke on Logo image for X Theme on latest update

  • Not sure if it is new code for your major update or if it is because of something different X Theme is doing in its latest update, but the logo image (and ONLY the logo image) is not doing the proper rewrite for some reason. Instead, it’s leaving off the S3 URL and only listing the bucket name etc as a relative URL, so the image is breaking. I’ve found this on several client websites that I recently updated. I finally stopped updating X Theme to the latest release until this gets resolved. Obviously X Theme is one of the most popular themes out there, so I wanted to bring this up.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor ianmjones


    Can you give me a concrete example of what the URL is expected to be and what you actually get?

    Thread Starter Geek Goddess


    Thank you for the reply! 🙂 Here is how it is currently showing up:


    It’s leaving off the first portion of the S3 URL. Please note the only place I’ve seen this happen is with the header logo on the sites. Other rewrites are being filtered correctly by your plugin.

    Thread Starter Geek Goddess



    Here is the proper code:

    It’s showing up this way…
    <img src="/why-people-quit-main-assets/2019/03/MM_Logo_Dark_Blue.png" alt="MEMBERSHIP MULTIPLIERS">

    But it should show up this way:
    <img src="" alt="MEMBERSHIP MULTIPLIERS" width="544" height="204">

    Thread Starter Geek Goddess


    I heard back from Themeco support and they are thinking it’s something in your plugin and not their update, specifically they state the following:

    X only gets the image URL for the header logo in the WordPress’ options table. I believe the Offload S3 plugin changes the URLs in that table. I’m not exactly sure so please confirm this or ask the Offload S3 support if they have such a feature. If they do, please ask them why the header logo URL’s not updated. Specifically, the option_name of the header logo is x_logo.

    I don’t really think this has anything to do with it because I think your plugin filters the output AFTER it’s retrieved…but it seems something has happened to the priorities perhaps of when the filter gets processed in the header…. Just trying to give you as much info as I can.

    Plugin Contributor ianmjones


    Hi @geek-goddess, you’re correct, WP Offload Media filters local Media Library URLs to the remote version if it matches an offloaded item.

    The broken link is very telling, it’s a relative URL, which WP Offload Media would never create (it only works with absolute URLs), so something is removing “; from the URL after WP Offload Media has done its filtering.

    Alternatively, maybe after you select the Media Library item for the header and save, the theme processes the S3 URL before WP Offload Media gets a chance to turn it back into a local URL. If the theme is stripping the domain etc. from the selected item’s URL to get it ready to save into its options record, it might be doing it early enough that WP Offload Media can’t then recognize it as an S3 URL and switch it back to local.

    WP Offload Media goes to great pains to switch any S3 URLs back to their local version before any saves to the database. If the theme changes the URL in JavaScript before save, or processes it with a priority of 10 or less via its own filter, then I can see that being an issue.

    Thread Starter Geek Goddess


    Hi @ianmjones , I appreciate your looking into this. I posted your response in the support forum for XTheme and gave them a test site to see what was going on. They were able to see there was an issue and have added it to their issue tracker to get it resolved. I will post an update here when it is resolved and any other comments they might make as to what the issue was/is.


    I’m facing exactly the same problem described by Geed Goddess. Except for the site logo, all images work fine using Offload Media Lite plugin (which stores images onto S3).

    One additional relevant information: the site logo image is actually converted to a “data:image/gif;base64” when you open the page. So I’m not sure this is actually related to the plugin itself.

    Hope to see this fixed sometime soon.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Rewrite broke on Logo image for X Theme on latest update’ is closed to new replies.