Support » Plugin: Optimum Gravatar Cache » Some gravatars not displaying?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Will Stocks


    This appears to have resolved itself now. It took about 20 mins to rectify for some reason – don’t know if there’s something you can do about performance there??

    Plugin Contributor Will Stocks


    It’s also worth me mentioning that I’m getting a few “errors”/warnings on the plugin page – I’m running PHP 7.2 at the moment:

    Warning: Use of undefined constant WP_TEMP_DIR – assumed ‘WP_TEMP_DIR’ (this will throw an Error in a future version of PHP) in
    /root/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 232

    Warning: Use of undefined constant WP_ADMIN_DIR – assumed ‘WP_ADMIN_DIR’ (this will throw an Error in a future version of PHP) in /root/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 234

    Warning: Cannot modify header information – headers already sent by (output started at /root/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php:232) in /root/wp-admin/includes/misc.php on line 1124

    Plugin Author José Miguel


    Hello @willstockstech,

    I tell you right now that my English is not good.

    I just saw this now.

    1 . All commenters start by using gravatar by default. Until they are downloaded from the gravatar in the background by the wordpress cron. When installing the plugin everyone uses the avatar by default. And they only start to resolve when someone visits a page that contains a certain avatar for a particular visitor or user. I will add an option in a future update so that it is possible to resolve the cache for all users who are in the wordpress database at one time.

    2. The URL “” does not really exist, which is strange, try resetting the default avatar or avatar by default.

    3. As for the warnings I receive I’m already dealing with this.

    I’m working on a new version, which will give you more options since adding custom class to avatars, Lazy Load and more.

    The URL runs and has avatres.

    You can send a link where there are avatars by default.

    Plugin Contributor Will Stocks


    Hi @jomisica

    Thanks for getting back! 🙂

    1. That’d be amazing. I’m not sure why it took as long as it did to generate then display the gravatar. I made sure to disable all other caching at the time as well, but for the duration of the “download” some users displayed no gravatar. Maybe it relates to point 2?

    2. I’ll try resetting it now. It’s weird, because if I check via FTP, the file definitely exists! I’ll try setting a manual default, then resetting it.

    3. Ah, brilliant news!

    Looking forward to the new version, as I have a lazy loading library included as part of my theme so being able to add that custom class would be amazing. Do you have an “upcoming features” log anywhere by chance? Some people do it, some don’t – I always like to see what’s coming up 🙂

    It looks like all of the gravatars have generated and cached now, I’ll see if I get another one in the meantime where the issue reoccurs.

    Plugin Author José Miguel


    Hi @willstockstech,

    1. The time it takes to start building the cache depends on the “Search for outdated avatars every” option and users being viewed on the site. The plugin is only known to a particular user / visitor when an avatar is requested. If for some reason you need to accelerate the construction of the cache in version 1.2.2 just configure the option “Search for outdated avatars every” with the value of 1 minute. And go settings -> users and list all the users you have. At the beginning of development I decided that this would be the best way to build the cache slowly so that it does not progee the user experience. In this way it only returns the custom avatar if it has already been built in the background without greatly influencing the response time in the page requests. This is important in my point of view for medium and large websites that use buddypress for example with many users. However I understand that it does not suit every situation. This way I will add a button on the plugin configuration page that will allow the plugin to recognize all the users that are inserted in the system.

    2. In previous versions because of my bad decision the custom avatar was saved in the directory of the plugin. And whenever the plugin was updated the avatar was removed and the user would have to upload again. In the next versions everything that is configurable will be stored in the cache directory. In your case I checked that I had already configured the default avatar in the format “PNG” at this link I’m waiting for you to manually reset the avatar by default and let me know if it solves the problem.

    As for custom classes, the plugin in the version I am developing allows adding one or more custom classes to all avatars and it will also be possible to add a class only to an avatar passing the class by argument. It also allows you to use Lazy Laod as an option which will allow you to decide to use the Lazy Load of the Plugin or Lazy Load of your Thema. This way having only one to deal with Lazy Load.

    As for the log “upcoming features” unfortunately for the moment I do not have but I will try to do so in the future.

    This plugin started out as a plugin just for one of my projects. Then I decided to share so that everyone has access to it. Of course it has been undergoing changes to be able to adapt to more situations than mine. This is why it is important to report problems that may arise when using the plugin. So that I can improve the plugin to adapt to the maximum number of projects.

    Plugin Contributor Will Stocks


    Hey @jomisica

    Sorry for the delayed response.

    1) That makes perfect sense, thanks for clarifying 🙂 I’ll give that a go if I ever have to rebuild my cache!

    2) I set a custom gravatar and that did the trick. I haven’t reset it back to default yet as that file is 0 bytes (0.svg). By default, there was no 0.png, only 0u.png which is the “default” icon that I set recently.

    The plugin definitely works, it’s actually very good and I’m very happy with it. I couldn’t find another plugin that catered for gravatars OTHER than those in comments (as obviously comments are typically where there are more avatars, rather than authors).

    For the time being, I’ve been really cheeky and manually edited the plugin’s PHP file to add my lazyload class, which has worked perfectly for my use case 😀

    Thanks for your help on these items. Looking forward to the next release! 😉

    Plugin Author José Miguel


    Hello @willstockstech,

    It is good that the problem has been solved and that it is working.

    In the next version you will no longer need to edit the plugin manually to add classes.

    I would like you to give your rating to the plugin. This is important, and it motivates development.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Some gravatars not displaying?’ is closed to new replies.