Make WordPress Core

Opened 14 months ago

Last modified 14 months ago

#58356 new enhancement

Gravatar local image cache

Reported by: javiercasares's profile JavierCasares Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Cache API Keywords:
Focuses: performance Cc:

Description

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.

Change History (1)

This ticket was mentioned in Slack in #hosting-community by javier. View the logs.


14 months ago

Note: See TracTickets for help on using tickets.