How to use "Vary for images"?

When using the “converter for media” plugin and the cloudflare cache, you need something called “Vary for images”, so I looked it up,
[ Vary for images · Cloudflare Cache (CDN) docs ]
I came across this page, but I don’t know how to create a variant rule.
Where do I copy and paste this code?

Hi there,

Those are API calls made from your terminal using cURL.

Take care.

Thanks for the reply.

I’m not sure I understand the situation at all, but by “terminal” do you mean a personal computer?
When I was looking up “curl”, I found an article that said it was using the windows command prompt, but I guess I can just paste the “Create a variants rule” part into CMD?

I can’t imagine how it would work, but with CMD I can’t try it lightly, so please let me know!

Hi there,

I’m not sure I understand the situation at all, but by “terminal” do you mean a personal computer?

I mean terminal:

I can’t imagine how it would work, but with CMD I can’t try it lightly, so please let me know!

What wouldn’t work? Since you’re using windows either install git or curl for windows, (or WSL if you prefer), adapt the API call to your use case (changing the email and key) and you should be able to run it.

Take care.

Hmmm…
Install a tool called “git” on your computer,

[curl -X PATCH
https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/cache/variants” \c
-H “X-Auth-Email: [email protected]” \
-H “X-Auth-Key: 3xamp1ek3y1234” \
-H “Content-Type: application/json” \ -H "Content-Type: application/json
–data
‘{“value”:{“jpeg”:[“image/webp”, “image/avif”], “jpg”:[“image/webp”, “image/avif”]}}’]

Do you mean to paste the above and change “[email protected]” and “3xamp1ek3y1234”?

I have never heard of this X-Auth-Email, is it an address registered with Cloudflare?
Is the X-Auth-Key obtained with an API token?
Can you also tell me how to set up the API token required for Vary for image?