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

Delete variants

You can delete variants via the Images dashboard or API. The only variant you cannot delete is public.

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

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": []
}