How to flush an image or all images from ShortPixel's CDN cache?

Flush cache of one image

If you are using ShortPixel Adaptive Image or Autoptimize (with the option to optimize images with ShortPixel) and you need to flush one of the CDN-cached images you can do it like this:

  1. Take the URL of the image in the CDN. For example: 
    https://cdn.shortpixel.ai/spai/w_605+q_lossless+ret_img+to_webp/https://shortpixel.com/blog/wp-content/uploads/2019/06/web-design-1-1024x734.jpg
  2. Copy the URL in your browser and add f_remove+ after https://cdn.shortpixel.ai/spai/, like this:
    https://cdn.shortpixel.ai/spai/f_remove+w_605+q_lossless+ret_img+to_webp/https://shortpixel.com/blog/wp-content/uploads/2019/06/web-design-1-1024x734.jpg
  3. Wait 30 seconds, and then the image should be flushed from the CDN cache.
  4. If you are using your own CDN with ShortPixel Adaptive Images, the previous steps may not work and you will have to flush your own CDN's cache from your CDN control panel as well.

Flush cache of all images (only ShortPixel AI)

Note: if you are using Autoptimize, please follow these instructions.

If you would like to flush the cache of all images in our CDN, then the workaround that you can use is the following, equivalent to flushing the whole CDN cache for a website:

  1. Go to your WordPress dashboard
  2. Go to Settings > ShortPixel AI > Behaviour
  3. Look for the field API URL, and change https://cdn.shortpixel.ai/spai to https://cdn.shortpixel.ai/spai2 like in the example below:

Afterwards, if you want again to flush the whole cache you can change https://cdn.shortpixel.ai/spai2 to https://cdn.shortpixel.ai/spai3 and so on - just increase the number each time you want to flush the cache again.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us