Cloudflare Docs
Images
Visit Cloudflare Image Optimization on GitHub
Set theme to dark (⇧+D)

Delete variants

You can delete variants via the Images dashboard or via API.

Delete a variant using the dashboard

  1. Log in to the Cloudflare dashboard and select your account.
  2. Click Images > Variants.
  3. Find the variant you want to remove and click Delete.

Delete a variant using the API

For detailed information on using the API, refer to the API endpoint documentation.

The following example deletes a variant through an API call:

curl -X DELETE https://api.cloudflare.com/client/v4/account/<ACCOUNT_ID>/images/v1/variants/<VARIANT_NAME> \
--header 'Authorization: Bearer <API_TOKEN>'

You will receive a response similar to this:

{
"result": {},
"success": true,
"errors": [],
"messages": []
}