Skip to content

How to Clear Optimole’s Image Cache ​

This guide explains how to invalidate (clear) the cache for your optimized images in Optimole, whether you're using the WordPress plugin or a custom integration.

In this article

WordPress Plugin Users ​

Clearing All Cached Images ​

If you need to clear the cache for all images on your site:

  1. Go to your WordPress Admin Dashboard
  2. Navigate to Admin → Optimole → Settings
  3. Click the Clear cached images button

This will purge all cached images from Optimole's servers.

Replacing Individual Images ​

When you replace a media file in your WordPress Media Library while keeping the same filename:

  • Optimole automatically clears the cache just for that specific image
  • This avoids the need for a full site cache purge
  • Your updated image will be processed and cached with the new content

Custom Integration Users ​

If you're not using WordPress and have integrated Optimole directly, you have two options for cache invalidation:

1. Using the Invalidation API ​

If you've deleted an image from Optimole but some links are still working, you can use the Invalidation API to clear the cache:

2. Using Cache Tokens (for re-downloading updated images) ​

If you've updated an image on your site and want Optimole to re-download and process it:

  1. Get a cache token from the Cache Token API
  2. Add the token to your image URL using one of these methods:

This prompts Optimole to fetch a fresh version of your image instead of serving the cached version.

Was this helpful?