Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sonictempest

    (@sonictempest)

    I used the same credentials at first but since I was getting the same error I created new ones to test but with the same result. I’ll try contacting my host.

    Thread Starter sonictempest

    (@sonictempest)

    Thanks for the clarification @masoudin , that helped point me in the right direction 👍

    I’ve tracked this down now and it turns out this one isn’t an offloading issue on your side.

    What was actually happening is specific to OceanWP when the Ocean Extra plugin is active, combined with a full cloud offload setup (no local uploads).

    OceanWP’s related posts and archive templates use Ocean Extra’s resize helper (ocean_extra_resize()), and in a setup where media files no longer exist locally, that function ends up returning an empty string. When that happens, OceanWP outputs the HTML as:

    <img src="">

    Because the src attribute is literally empty, no request is ever made, so the offloader and redirect rules never get a chance to kick in, even though the files do exist in R2.

    That explains why:

    • Gutenberg images and featured images worked fine
    • disabling Ocean Extra immediately fixed related post and archive thumbnails
    • some thumbnails appeared “missing” even though they were offloaded

    The fix on my end was to override OceanWP’s related post and archive templates in my child theme and bypass the Ocean Extra resize path, forcing core WordPress thumbnail output instead. Once WordPress outputs a real URL, Advanced Media Offloader rewrites it correctly and everything works as expected.

    So just to confirm:

    • WordPress isn’t generating thumbnails on the fly here
    • the files weren’t missing from R2
    • this was Ocean Extra returning an empty URL when no local file exists

    All good now, marking this as resolved on my side. Thanks again for the help!

    Thread Starter sonictempest

    (@sonictempest)

    Thanks @masoudin, however I’ve noticed that some thumbnails did not get replaced, I’m guessing because WordPress can generate them on the fly?

    Thread Starter sonictempest

    (@sonictempest)

    I came up with a solution, since I’m already using Cloudflare, I set up a global wildcard rule that replaces urls that contain “/wp-content/uploads/” with the R2 url, pretty neat workaround, but it would be nice if the plugin already did this already.

    Also, if I change servers/hosts will the plugin be automatically detected as long as the credentials are the same or is there something that needs to be done before migration?

    Thread Starter sonictempest

    (@sonictempest)

    Worked like a charm!

    Sorry about the delay!

    Thank you so much!

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