WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] Cache Gravatars? (4 posts)

  1. jivany
    Member
    Posted 4 years ago #

    Would it be possible to cache gravatars?

    Passing a default image to gravatar results in a lot of different URLs all pointing to the same image (either the default on Gravatar or your own default). It would be really nice if W3 could detect undefined gravatars and replace them with a direct link to a user defined value (on the CDN for example).

    Example, these two URLs point to the same "Mystery Man" image:
    http://www.gravatar.com/avatar/5d637371923992c2b906e862665bfa78?s=80&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G
    http://www.gravatar.com/avatar/14b42fddd993e49049a3cdcff76206c5?s=80&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G

    If you change the first URL to thie following, it returns a 404 meaning the user has no gravatar:
    http://www.gravatar.com/avatar/5d637371923992c2b906e862665bfa78?d=404

    This could then be replaced by something like:
    http://my_cdn.tld/default_gravatar.png

    For users who have a gravatar, re-writing (minify) the URLs to remove all of the extra info (specifically the "d" value) could save hundreds or thousands of bytes on chatty pages.

    I would assume this gravatar checking would have to be done in the background. If a user changes their gravatar, obviously it wouldn't update until the cache expired. Not a big deal. ;)

    Thanks for a great plugin!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Posted 4 years ago #

    Would it be possible to cache gravatars?

    Sorry this is not possible now and there are no plans for it as the Gravatar service does a decent job in most respects. Sorry.

  3. a1wsn
    Member
    Posted 4 years ago #

    Please see the following link for a detailed explanation about the speed problem with Gravatars :

    http://www.seomofo.com/wordpress/comments-slow-page-speed.html

  4. Frederick Townes
    Member
    Posted 4 years ago #

    I'm already aware of the various concerns. But this is currently beyond the scope of the plugin as there are too many use cases to make a single one-size-fits all solution right now.

Topic Closed

This topic has been closed to new replies.

About this Topic