[wp-trac] [WordPress Trac] #58356: Gravatar local image cache

WordPress Trac noreply at wordpress.org
Fri May 19 10:38:52 UTC 2023


#58356: Gravatar local image cache
---------------------------+-----------------------------
 Reporter:  JavierCasares  |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Cache API      |    Version:
 Severity:  normal         |   Keywords:
  Focuses:  performance    |
---------------------------+-----------------------------
 One of the native features of WordPress is the ability to use images in
 comments or for users. By default, these images are based on email
 accounts and are loaded from Gravatar.

 Each time one of these images is to be uploaded, a call is made to the
 Gravatar CDN, which implies, every so often, a DNS request, downloading
 from an external server and reliance on a third-party service.

 NOTE: This proposal does not go into legal issues such as whether MD5 is
 secure or not, or whether privacy legislation such as GDPR must be
 complied with. This proposal is purely for performance.

 The idea would be to give the user the possibility to store the images
 every N hours, for example with an extra option in Settings → Comments.

 The images would be called once to be downloaded every N hours, a Cron
 system may be used for downloading, and a flag that warns if the image is
 in local or not (and not to make requests to the disk to check it, since
 it would be cached in the user data, which have to be loaded anyway).

 It is possible that on small sites the impact would be minimal, but on
 larger sites, or sites with many comments, the number of external calls
 would be reduced.

 In addition, this should also help the sustainability of the sites, since
 the decision of how often things are cached does not depend on Gravatar
 but on the user, in addition to the configurations that can be made by the
 hosting.

 Related: #14682 #16020 #44268 #55062.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58356>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list