• Resolved nknov12

    (@nknov12)


    Hi, this is a wonderful plugin and easy to set up with Cloudflare R2 following your instructions in the blog. Thank you for sharing this. Can’t wait to see what’s next.

    A few questions regarding the setup

    a) How to set up ‘Custom Path Prefix’ using wp-config or a function. I’ve looked at the development hooks at https://wpfitter.com/documents/advanced-media-offloader/development-hooks/. It doesn’t seem to be available, or am I missing something

    b) There are multiple other files in wp-uploads like PDFs, TXT, User Uploaded files, Plugin folders – like elementor, fluentforms etc. They don’t seem to be uploaded to CloudFlare R2 using the tool. What should be the suggested approach to handle them? Will they work if dragged and dropped to R2 bucket?

    c) Some images get rendered, other images even when moved to the Cloudlfare R2 don’t get loaded from there – especially in Posts/Pages. Do these Posts/Pages need to be recreated/image re-embedded. I’ve seen that for Spectra developed pages. One drawback of re-embedding would be it wouldn’t have the ‘Retain Local Files’ flexibility

    Much appreciate your advise on these.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Masoud Golchin

    (@masoudin)

    Hi @nknov12

    Thank you so much for the kind words! I’m thrilled to hear the Cloudflare R2 setup was smooth for you. Here are the answers to your questions:

    • a) Custom Path Prefix: Currently, this can only be edited via the plugin’s settings page. Could you share your specific use case for needing to set this via wp-config or a function? We’d be happy to consider adding this feature in a future update.
    • b) Other Files/Folders: Advanced Media Offloader only handles files registered within the WordPress Media Library. It does not currently offload or rewrite URLs for external folders (like those from Elementor or Fluent Forms). We plan to add compatibility for more plugins in the future based on user demand.
    • c) Image Rendering Issues: To help me troubleshoot, could you confirm if those specific images show as “Offloaded” in your Media Library? It would also be very helpful if you could share an example of the old URL (that works) and the new URL (that isn’t rendering).

    Please let me know these details, and I’ll be happy to take a closer look!

    Thread Starter nknov12

    (@nknov12)

    a) Custom Path Prefix – when managing separate environments through wp-config.php. Its not a big deal, can do a cli search replace.

    c) Image Rendering Issues: This is a block in a post. The post was made using Spectra Gutenburg blocks plugin. https://ww.wp.xz.cn/plugins/ultimate-addons-for-gutenberg/

    <!-- wp:uagb/container {"block_id":"0b52ce18","innerContentCustomWidthMobile":426,"directionDesktop":"row","alignItemsTablet":"flex-end","backgroundType":"color","backgroundColor":"","gradientValue":"linear-gradient(140deg,rgb(255,255,255) 0%,rgba(235,237,239,0.87) 100%)","borderStyle":"","variationSelected":true,"isBlockRootParent":true} -->
    <div class="wp-block-uagb-container uagb-block-0b52ce18 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap"><!-- wp:uagb/container {"block_id":"a52f80f9","widthDesktop":55,"widthTablet":40,"justifyContentTablet":"flex-end","borderStyle":"","topMarginMobile":0,"bottomMarginMobile":0,"leftMarginMobile":20,"rightMarginMobile":20,"marginLink":false,"variationSelected":true,"widthSetByUser":true} -->
    <div class="wp-block-uagb-container uagb-block-a52f80f9"><!-- wp:uagb/image {"block_id":"0e82d847","url":"http://localhost:10004/wp-content/uploads/2025/06/Launch-Form-Image-1-683x1024.png","urlTablet":"http://localhost:10004/wp-content/uploads/2025/06/Launch-Form-Image-1.png","urlMobile":"http://localhost:10004/wp-content/uploads/2025/06/Launch-Form-Image-1.png","align":"center","alignMobile":"center","id":8500,"linkDestination":"none","title":"Launch-Form-Image","width":342,"widthTablet":538,"height":507,"heightTablet":614,"naturalWidth":538,"naturalHeight":614,"sizeSlug":"large","sizeSlugTablet":"full","sizeSlugMobile":"full","imageTopMargin":140,"imageTopMarginTablet":40,"imageTopMarginMobile":0,"imageBottomMarginMobile":-14,"imageMarginLink":false,"objectFit":"contain","customHeightSetDesktop":true,"className":"aligncenter","UAGHideMob":true,"UAGResponsiveConditions":true} -->

    The following is rendered in the browser even though https://mediafiles.example.com/prefix/2025/06/Launch-Form-Image-1-683×1024.png: exists. Note, all other images on the site besides those with pages made on Spectra load fine.

    <div class="wp-block-uagb-image alignleft uagb-block-0e82d847 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-left" data-cya11y-org-font-size="15" style="font-size: 15px;"><figure class="wp-block-uagb-image__figure"><img fetchpriority="high" decoding="async" srcset="http://localhost:10004/wp-content/uploads/2025/06/Launch-Form-Image-1-683x1024.png ,http://localhost:10004/wp-content/uploads/2025/06/Launch-Form-Image-1-683x1024.png 780w, http://localhost:10004/wp-content/uploads/2025/06/Launch-Form-Image-1-683x1024.png 360w" sizes="(max-width: 480px) 150px" src="http://localhost:10004/wp-content/uploads/2025/06/Launch-Form-Image-1-683x1024.png" alt="" class="uag-image-9649" width="400" height="400" title="Launch-Form-Image" role="img"></figure></div>

    P.s.: Any timelines on when you plan to release Private mode?

    Plugin Author Masoud Golchin

    (@masoudin)

    Hi @nknov12

    The issue occurs because that specific plugin hardcodes the exact file URLs into its blocks instead of referencing their attachment IDs. This prevents the offloader from dynamically updating the links.

    While we may explore a workaround in the future if more users request it, I recommend reaching out to that plugin’s developer to see if they can switch to using attachment IDs.

    Regarding private files, we are actively working on this feature! We don’t have an exact ETA yet, but it is on our roadmap.

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

You must be logged in to reply to this topic.