Image Transform Billing

For Workes & Pages, what is the name of the domain?

NA

What is the issue or error you’re encountering

Confusion about billing calculations

What steps have you taken to resolve the issue?

Q1: If my website has only one image and I only convert the format once, but there are 1 million global access requests per month, will the bill still be $0.5 USD for that month? If there is only one conversion per month, is it still $0.5 USD?

Q2: I modified the HTML code of this image like this: /cdn-cgi/image/format=auto,quality=70,fit=scale-down,width=1600/<MY-IMAGE> to meet the following two requirements:

  • Automatically return a webp or avif version to visitors with 70% quality.
  • If the image resolution width is greater than 1600, for example, 2610, then return a version with a width of 1600.
  1. Is this URL format correct?
  2. Will this result in two conversion requests? One for the 70% quality version at 2610 size and another for the 70% quality version at 1600 size. I’m asking this because I’m confused about how many conversion requests an option like fit (with Crop or scale-down) would generate.

Our pricing model bills for each unique transformation.

For example, if you have a transformation URL that looks like /cdn-cgi/image/format=auto/hello.png, then this counts as 1 unique transformation, whether there are 100 or 1,000,000 requests to serve that transformed image.

Using format=auto may serve the image as AVIF to one user and as WebP to another user. This still counts as 1 unique transformation, rather than billing as 2 separate transformations.

You can find our documentation for transformations here.

For your second question, your URL format is correct.

If your source image is greater than 1600, then the image will be served at a width of 1600. This counts as 1 unique transformation.

If your source image is smaller than 1600, then the image will be served in its original size with the other parameters (format and quality) applied. This counts as 1 unique transformation.

Assuming you don’t change the source image, your source image will always be either greater than 1600 or smaller than 1600, resulting in only 1 unique transformation.

However, if your source image changes (i.e. you replace <MY-IMAGE> with a different image), then this will yield another unique transformation for the same URL.

Do you intend to change your source image often?

Thanks~ No, i will not change the image.

if in the case the source image is greater than 1600, only width option work? THE format=auto,quality=70 option dose NOT work? i thought i will get a width of 1600 with 70 quality webp/avif ,Isn’t it?

and。。。。 Will 1-10 unique transformation charge 0.5 USD?

I hope Cloudflare can be more intelligent when responding to image requests. For example, it could automatically provide an image width based on the device the user is using. Users could provide two widths: one for desktop use, such as 1800, and another for mobile phones, such as 700. When the original image width is 3200, if accessed from a mobile device, an image with a width of 700 should be returned. Conversely, if accessed from a PC, an image with a width of 1800 should be returned.

This is a constructive suggestion.

Alright, can you now respond to my previous follow-up question? Thank you.

@deanna

All parameters, if applicable, will apply. In your example, if the source image is 2610, then we serve an image where the width is 1600, the quality is 70, and the format is automatically optimized for the user’s browser (e.g. AVIF). If the source image is smaller than the specified width, then all other parameters (like format and quality) still apply.

Transformations cost $0.50 for every 1,000 unique transformations per month. We bill on a sliding window — see our Pricing documentation.

To serve responsive images, we typically recommend that developers use the HTML srcset attribute. This will let the browser choose the image width that is most optimal for a given user’s screen resolution. Here’s a guide on how you can serve responsive images with Images.

This topic was automatically closed after 15 days. New replies are no longer allowed.