When you have an active WordPress blog with a thriving comment section, the platform automatically pulls user profile pictures from an external service called Gravatar. While this makes identifying commenters easy, it creates a massive performance bottleneck. If a single post has 30 comments, your visitor's browser is forced to make 30 separate external network connections to Gravatar's servers just to load those tiny avatars. This floods the browser with third-party HTTP requests and severely impacts your Core Web Vitals.

Because your Sternhost server is optimized with LiteSpeed, you do not need to disable avatars entirely to fix this. You can easily instruct your server to download and store these avatars locally using the LiteSpeed Cache plugin, allowing them to load instantly alongside your own images.

Step 1: Navigating to the Discussion Optimization Settings

The LiteSpeed plugin includes a dedicated section specifically for handling comments and their associated media files.

  • Log in to your WordPress admin dashboard.

  • In the left-hand sidebar, hover over LiteSpeed Cache and click on Page Optimization.

  • Click on the Discussion Settings tab located at the top of the settings screen.

Step 2: Activating the Gravatar Cache

Once you are in the discussion settings, you can turn on the local caching feature and set how long the server should hold onto the images.

  • Scroll down until you find the setting specifically labeled 'Gravatar Cache'.

  • Toggle this switch to ON.

  • Directly below that, look for 'Gravatar Cache Cron' and toggle it to ON. This allows LiteSpeed to refresh outdated avatars automatically in the background.

  • Leave the 'Gravatar Cache TTL' at its default value (usually 604800 seconds, which equals one week).

  • Scroll to the bottom of the page and click the Save Changes button.

Why Caching Gravatars is Essential for Blogs

  • Eliminates External Network Lookups: Your visitors' browsers no longer have to spend time connecting to secure.gravatar.com, completely wiping out dozens of external DNS lookups.

  • Enables Global CDN Delivery: Once the avatars are stored locally on your Sternhost server, they can be distributed through your own CDN (like QUIC.cloud or Cloudflare) just like your regular media uploads, ensuring fast delivery worldwide.

  • Improves Privacy and Stability: If the external Gravatar servers ever go down or experience a slow-down, your website's performance will remain completely unaffected because you are hosting the files yourself.

Was this answer helpful? 0 Users Found This Useful (0 Votes)