• I am a regular user of the Offload Media Plugin. Rewrite local url functionality is properly functioning for offloaded media files. But the issue is for User Avatar Images.

    I am using a plugin Simple Local Avatars to add an Avatar image file to user profiles. Any image file uploaded has a Server URL. Example as https://www.site.com/wp-content/uploads/2023/09/abc.jpg

    But after usage of the Offload Remaining Now option via Dashboard -> Settings -> WP Offload Media -> Tools -> Offload Remaining Now
    Media files are being offloaded. (Remove Local Media Option at Media Menu also Turned ON)

    The URL of the avatar image uploaded becomes an Example
    https://cdn.site.com/wp-content/uploads/2023/09/abc.jpg

    But for these Avatar images as when the site is loaded. These offloaded media files’ local URL is not rewritten to point to the Amazon Cloudfront URL.

    Importantly, for the site’s other images, this plugin properly serves offloaded media files by rewriting the local URL so that they point to the Amazon Cloudfront URL.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi there!

    WP Offload Media Support Team here, Thanks for reaching out with your query we would be happy to assist


    Looks like you also created a ticket using the support form. My colleague responded on that ticket but will still resend her reply below:

    Most compatibility issues arise when WP Offload Media is configured to remove files from the server after uploading to the bucket. Many types of plugins require access to the local file.

    https://deliciousbrains.com/wp-offload-media/doc/compatibility-with-other-plugins/

    The most likely reason for the issue is that “Simple Local Avatars” is not using the WordPress hooks that WP Offload Media requires to rewrite the URLs –

    https://deliciousbrains.com/wp-offload-media/doc/developer-guide/#local-to-provider-hooks

    If that is the case, it might be best to contact their support team about this issue, to see if they can find a workaround. You may point them to our documentation about filtering URLs.

    https://deliciousbrains.com/wp-offload-media/doc/filtering-urls-in-custom-content/

    If you have any further questions, concerns, please refer to your existing ticket instead as you are a pro customer.

    Thank you!

    Thread Starter Sahil B. (Ph.D.)

    (@andy786)

    Hello WP Offload Media Support Team,

    I would be contacting “Simple Local Avatars” support team about this issue and will point them to your documentation about filtering URLs.

    Meanwhile, I have successfully implemented a manual workaround for uploading Avatar. I am writing it over here. It could be beneficial for other Free/Pro users of your Offload Media plugin until the “Simple Local Avatars” plugin doesn’t tweak their plugin for using WordPress hooks.

    The Manual Workaround is as follows:

    Dashboard -> Settings -> WP Offload Media -> Media

    -> Offload Media option Turned On (Copies media files to the storage provider after being uploaded, edited, or optimized)

    -> Remove Local Media to be turned OFF

    -> Uploading the image file as Avatar. Now It will have the Local URL as well storage provider URL.

    -> Remove Local Media to be turned OFF (Note: It is important to skip the next option Remove all files from the server “You’ve enabled the “Remove Local Media” option. Do you want to remove all existing files from the server that have already been offloaded??Click on Skip)

    Because we don’t have the Avatar image present locally at the Server with the local URL to be removed.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rewriting Local URL is not functionable for User Avatars Images’ is closed to new replies.