| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/images/optimization/hosted-images/delete-variants/ | [Back] [Original] |
You can delete variants via the Images dashboard or API. The only variant you cannot delete is public.
Caution
Deleting a variant is a global action that will affect other images that contain that variant.
In the Cloudflare dashboard, go to the Hosted Images page.
Go to Hosted images ↗Select the Delivery tab.
Find the variant you want to remove and select Delete.
Make a DELETE request to the delete variant endpoint.
curl --request DELETE https://api.cloudflare.com/client/v4/accounts/{account_id}/images/v1/variants/{variant_name} \
--header "Authorization: Bearer <API_TOKEN>"
After the variant has been deleted, the response returns "success": true.
| Web Proxy Viewer | New URL | Original Page |