Purging Images

If you need to remove or update an image on imgix, you can purge it from our caches. Common reasons for purging an image are:

  1. You want to update an image in your Source without renaming the file.
  2. An out-of-date or unwanted image is being served through your imgix Source. In this case, the image must be removed from your Source first before triggering a purge request. Otherwise, our servers will continue to fetch the image from the Origin and nothing will change.

Purging removes the master image (e.g. from our caches, which then clears out all transformations as well (, etc.). The image in your Source remains untouched by the purge operation.

Purging from the Dashboard

Using the Tools view in the imgix Dashboard is the easiest way to purge an image. Simply paste the imgix URL of the image you want to purge in the text box in the Purge Single Image section and click Purge.

Screenshot-Purging single image from Dashboard

Purging with CURL

If you’re comfortable using the command line, it’s the fastest way to purge an image. First, find your API Key on the Account page. Then simply plug it, and the URL of the image you want to purge, into the example below.

curl "" \
  -u "$API_KEY:" \
  -d "url=$URL_TO_PURGE"

Purging with Python

Below is an example of purging an image with Python and the Requests library.

import requests

API_KEY = "" # REPLACE - find your API KEY @

def purge_imgix_image(url):
    purge_endpoint = "", auth=(API_KEY, ''), data={"url": url})