Hi,
I uploaded a default gravatar, but now the following URL gets included in the source:
https://www.gravatar.com/avatar/d51b5d6b788001557dcd340c7de498c7?s=50&r=G&d=https%3A%2F%2Fwww.mysite.com%2Fwp-content%2Fuploads%2Foptimum-gravatar-cache%2F01f_e344fdd213800da1aa115da124d38bc5.png
which redirects to:
https://i2.wp.com/www.mysite.com/wp-content/uploads/optimum-gravatar-cache/01f_e344fdd213800da1aa115da124d38bc5.png?ssl=1
Please note I have replaced the domain name for privacy reasons, thus the URLs won’t work.
I was expecting that the following URL will get included:
https://www.mysite.com/wp-content/uploads/optimum-gravatar-cache/01f_e344fdd213800da1aa115da124d38bc5.png
Is this a bug or working as intended?
]]>Hi there,
I am trying to set this up on my site and keep getting the error:
Could not create directory ‘/wordpress/wp-content/uploads/optimum-gravatar-cache/’.
Please make sure the ‘/wordpress/wp-content/uploads’ directory exists and you have write permissions on this directory.
I have set these folders to 777 permissions and created the /optimum-gravatar-cache/
folder manually, and still get the error.
To confirm, is the /wordpress/
folder just a placeholder for the site name? My site folder structure is: /org-myorg/sitename/wp-content/uploads
After installing the plugin, I don’t see it under Settings -> Gravatar Optimum Cache
Is there some reason why this would happen? Maybe some sort of user role thing?
]]>Hi there. I have installed the plugin and set up accordingly but on Gtmetrix the gravatars are stil redirecting to the external site as opposed to the cached image. Is there something I’m missing?
Thanks
]]>Hey @jomisica,
So, I know you’re working on lazyloading for Gravatars, which is great!
Two questions I have, are you going to have a “my theme takes care of lazyloading” option, so you just assign the class automatically? Or are you leaving the “add a class” option in place still?
Also, will you be including a LQIP image for lazyloading, or will you be “blank” lazyloading? I do it currently with all my images, but haven’t yet worked out if/how to do it with OGC.
If you are doing LQIP:
If my theme already takes care of lazyloading, would it still be possible for me to utilise the LQIP you’re implementing, while my theme does the actual lazyloading, rather than loading 2 x lazyloading libraries?
]]>Hi team,
Thanks for this great plugin. I just installed it and found it useful but your plugin is not able to cache a particular images which is appearing on my home page and causing the below error.No matter what I do its not working.
This is the error I am getting . Canyou please tell me what I am doing wrong
Leverage browser caching for the following cacheable resources:
The OGC database table that gets created appears to be considered as orphaned by a lot of DB plugins (main one I use is WP-Optimize). If you go to the tables tab, you’ll see that it thinks OGC is no longer installed/using that table and allows you to remove it. This could be confusing for “non-techy” users.
I’m not sure why it thinks that, but for all other plugins that have created a table (in my case, Smush, Yoast and another plugin I now can’t remember), the issue does not exist, for some reason it’s only OGC that has this issue at the mo. I’m in the process of getting a staging environment setup that is like-for-like so will supply credentials so you’re able to see it yourself.
]]>Hi Miguel,
When I hit “Save Changes” in the OGC admin panel, I get an error come up:
Optimum Gravatar Cache
Could not apply the permissions ‘0775’ to the ‘server-path/wp-content/uploads/optimum-gravatar-cache/avatar/’ directory.
I logged in to my FTP, navigated to the folder and 0755 is the permissions already set on the folder. I reapplied the permissions manually and recursed into all files and folders (just to check) and hit “Save” again – the same error popped up.
I’m not sure what this is or isn’t doing?
Gravatars seem to be generating correctly though!
OGC v1.4.4
]]>Hi. What is about 2x sizes? Why did you remove “srcset 2x”?
]]>Per discussion, support for W3TC would be beneficial, as W3TC is one of the (if not the) biggest caching plugins on WP (over 1m installs).
I’m adding the following to my install:
case 'w3-total-cache':
foreach ($postsIDsToClear as $postIDToClear) {
w3tc_flush_post((int)$postIDToClear);
w3tc_cdn_purge_files(); //Pass rray consisting of uri paths (i.e /wp-content/uploads/optimum-gravatar-cache/avatar/2.jpg)
}
break;
and
if (defined('W3TC')) {
$this->cachePagePlugins='w3-total-cache';
return;
}
Using the w3tc_cdn_purge_files();
function is to be confirmed, based on: https://www.ads-software.com/support/topic/api-documentation-6/#post-11170484 – you likely do not want to “purge” a file, it’s probably more appropriate to “invalidate” a URI?
Hey @jomisica
So OGC has done its checks and my gravatar has updated everywhere on my site EXCEPT my homepage.
I’m not sure why this is, because:
Homepage src = https://cdn.willstocks.com/wp-content/uploads/optimum-gravatar-cache/avatar/2.jpg?d=thb95k
Every other page src:
(Single) https://cdn.willstocks.com/wp-content/uploads/optimum-gravatar-cache/avatar/3.jpg?d=thb95k
(Author) https://cdn.willstocks.com/wp-content/uploads/optimum-gravatar-cache/avatar/4.jpg?d=thb95k
An example of this is:
https://willstocks.co.uk/author/will_stocks/
You can see that it has pulled the correct image at the top of the screen, but the image for each of the posts is incorrect (an old version).
I have also just noticed that OGC isn’t replacing the Gravatar with the “local” version in my sidebar widget (see https://willstocks.co.uk)
]]>Hey @jomisica,
A feature that I think might be worthwhile for users: a line (maybe in the “stats” page) that shows the last time the plugin checked for new gravatars.
That way, when trying to work out when a set of gravatars is next due to update, an admin can know roughly when to expect that to happen?
Hey @jomisica
I hope you are well?
I changed my Gravatar image late last week to a new image. I was expecting to see this reflected on my site within a day or two (I have the “check for outdated gravatars” set to every 1 day and check every 5 minutes), however it did not update!
I thought maybe it was something to do with my site’s caching plugin, so I cleared my site cache – no change.
I tried “sync users and commenters now” in the plugin – nothing happened at all.
I then had to clear the gravatar cache (the button is/was disabled for some reason, so I enabled the button by editing the html and removing disabled=”disabled”) which meant I could click the button and the cache then emptied.
My new gravatar then started to show and started caching (although I had to navigate through all pages that have a gravatar for it to cache each correct image).
Any idea why this would/did happen?
]]>The plugin requires php-dg or php-imagick PHP modules to perform their tasks.
However these modules have different capabilities php-imagick has ability to handle .SVG, resize/convert and some more that I would like to use in the future.
What module do you use?
]]>Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php:135 Stack trace: #0 /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php(2772): OGC->__construct() #1 /WillStocks/wp-settings.php(305): include_once('/WillStocks/wp-co...') #2 /WillStocks/wp-config.php(47): require_once('/WillStocks/wp-co...') #3 /WillStocks/wp-load.php(37): require_once('/WillStocks/wp-co...') #4 /WillStocks/wp-admin/admin.php(31): require_once('//WillStocks/wp-co...') #5 /WillStocks/wp-admin/index.php(10): require_once('/WillStocks/wp-co...') #6 {main} thrown in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 135
I have had to disable the plugin due to the above error being shown on WP-Admin
]]>Hi there,
The plugin appears to be working pretty well for me!
It’s cached my gravatar, not only for comments but also for author pages which is GREAT! Most other plugins don’t handle this ??
However it doesn’t seem to be displaying all commenters gravatars correctly for me?
As you can see here: https://willstocks.co.uk/review-aukey-12000mah-solar-rechargeable-power-bank/#comments there’s a comment by “Matt” which has no gravatar associated.
Looking at the URL it’s calling: https://willstocks.co.uk/wp-content/uploads/optimum-gravatar-cache/avatar/0.svg this doesn’t exist? Before I enabled the plugin, this persons gravatar was displaying correctly. Even if they removed their gravatar, I’d expect it to show the default gravatar image that’s set either by WP or by the plugin?
]]>I installed this plugin a few days ago, but until now there are no files cached.
Any advice to debug this issue?
]]>I have installed the plugin and navigated to the Stats tab and saw this PHP warning –
“/home1/user/public_html/site/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1063 and defined in /home1/user/public_html/site/wp-includes/wp-db.php on line 1292”
After doing a quick Google search, I have found the below article which clearly states that the used SQL query is vulnerable to SQL injection. The error occurs in 1063, 1066 and 1069 lines. Kindly update the SQL queries and release the new update.
]]>