Viewing 5 replies - 1 through 5 (of 5 total)
  • Looking for exact same thing. Perhaps on multisite there could be an extra network admin option page with a toggle to make user avatars global for the entire network and not site-specific?

    I will keep this request in mind, but the main issue is that sites in a multisite installation are actually separate and do not share assets. WP User Avatar images are stored in the Media Library; each site has its own. To use avatars across sites, you’d have to use Gravatar.

    I realize that, but that’s only an issue because the attachment ID, and not the image url, is stored as user meta.

    Obviously the attachment ID is only valid on the blog the image was uploaded to, but since user meta data is “global” for the network anyway, perhaps you could add an extra user meta key (without the blog ID in the key/name) which holds the url to the image. Then with an extra settings page for the network admin with an option (eg. checkbox) to turn global avatar usage on/off.

    That way when global avatar usage is switched on, the user meta key with the URL is used to display all avatars, meaning uploaded once on a blog, means it can be shown on all sites in the network. As far as uploading the image goes, it is uploaded to the media library of the blog you’re on, and gets stored per normal, the local attachment ID is stored for this blog, but then the URL to the image is also stored in the “global” user meta key.

    And when global avatar usage is switched off, the attachment ID is used for the active blog so the avatar images are local to the blog.

    PS. I dislike Gravatar because you are forced to rely on an external server and there’s tracking/privacy concerns associated with Gravatar. E.g. the browser extension Ghostery blocks Gravatar for the latter reason.

    I store the attachment ID because otherwise there is no way to call the different sizes for the avatar (original, large, medium, thumbnail, and any custom image sizes) if you are using just an image URL. I understand your suggestions, but I would need to do more research on the best way to approach this idea.

    I know that many people use my plugin because they dislike Gravatar. Although I appreciate the number of users for my plugin, I actually have nothing against Gravatar and never intended this plugin to replace every Gravatar feature. I could head down that road, but I acknowledge that Gravatar has been around longer than I have and probably has a bigger development team than me. (My team being only myself.)

    I didn’t mean to thrash Gravatar, it’s just my personal view.

    Also, your work on the plugin is very much appreciated!

    If you don’t mind, some more ideas on this: perhaps you could store an array of URLs for the various default sizes. I suppose you couldn’t really account for custom image sizes, as they could vary per blog, depending on the theme used. However I would consider that a fair trade off to be able to use the avatars across the network.

    Might be good to upload avatars not to the default upload directory for the blog (eg. …uploads/sites/13/avatar21.png), but like a “wp-user-avatars” subfolder (…uploads/wp-user-avatars/avatar21.png) of the uploads directory, and skip adding it to the local blog’s media library, because otherwise some local blog admin could delete the global avatar of any user which is linked to the blog, which is not desirable.

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

The topic ‘Multisite’ is closed to new replies.