• Hello,

    I’m using WP Offload Media on a website where I offload all media to Amazon S3 and delete the local files to save some server storage.

    However with your plugin, I even tried to reupload an avatar picture for a WordPress Author user and on the front-end this is the local image URL that is being output and so there are broken images for author.

    I contacted WP Offload Media team and they told me this:

    The most likely reason for this is “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

    You could try and contact the “Simple Local Avatars” authors and see if they could try to implement these wordpress hooks.
    Or even use the following filters to rewrite the local URLs into their S3 versions –
    https://deliciousbrains.com/wp-offload-media/doc/filtering-urls-in-custom-content/

    For my own function internal I used their filter and it worked great.
    So maybe you can check if the filter exists and use it before returning the avatar picture URL?

    $image_url = wp_get_attachment_url($image_id);
            if ( has_filter('as3cf_filter_post_local_to_provider') ) {
                $image_url = apply_filters( 'as3cf_filter_post_local_to_provider', $image_url );
            }

    Can you do something for this please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter enthousiastwpuser

    (@enthousiastwpuser)

    When I remove the avatar and select one from the library, actually it’s returning a mixed URL with both local base URL and then the last part of the URL with the bucket name and the object versioning string.

    I have the “Remove Local Media” enabled inside WP Offload Media.

    Here’s more information from WP Offload Media support team:

    “One issue I saw in my local site is that when the Media Library item is removed from the server (Remove Local Media is enabled), then the Simple Local Avatars plugin fails to load the profile image. It seems it’s possible that it’s using a different way of retrieving this URLs, or the timing is off in that WP Offload Media maybe hasn’t loaded yet when they display the avatar.

    Unfortunately we are limited in the support we can provide for this as we don’t have the right expertise on this plugin. 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/”

    I having the same issue.

    Wherever the user doesn’t have a local avatar, it is returning a mixed URL with both the gravatar URL and then the Amazon S3 URL and the object versioning string.

    Keith

    (@keithkhl)

    I also have the same issue

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP Offload Media compatibility issue’ is closed to new replies.