Large Media image transformations don't appear to be caching as documented

Hello,

I have been using Netlify’s Large Media for around a month now and have now reached the second billing period. Looking at the stats for my usage, I’m currently 9 days in and already at almost 2k transformations and hitting the 2.5k limit, with no more than 150-200 total transformed images across the entire site I wouldn’t expect this to be the case.

As I understand, as an image with the transformation params is hit for the first time within the billing period, it will be a fresh transform/resize and will then cache the image for later responses in that period. Is this cache server-side or client-side (cache headers)? If it’s the former then this doesn’t seem to be holding true, am I missing something here? Thanks in advance!

Site: https://lilchiefrecords.com or https://lilchiefrecords-preview.netlify.app.

Hi, @NathanWild. The image transformation count does reset each month. The way the transformations counts work is like this:

Let’s say the request is for https://example.com/image-1.jpg. There is no transform so there is no count for that request. Then a new person make a request for a different size:

https://example.com/image-1.jpg?nf_resize=fit&w=400

This would count as a single transformation and be cached. It won’t matter how many requests are made for that URL for the rest of that billing cycle.

The high transformation counts tend to happen when there are many images and also many sizes. So, if that image above is requested again at a different size like so it will count as a new transformation:

https://example.com/image-1.jpg?nf_resize=fit&w=500

I don’t know how many different sizes your site will resize too. Is it in increments of 50 like so?

https://example.com/image-1.jpg?nf_resize=fit&w=500
https://example.com/image-1.jpg?nf_resize=fit&w=550
https://example.com/image-1.jpg?nf_resize=fit&w=600
https://example.com/image-1.jpg?nf_resize=fit&w=650
...

Or can it resize to individual pixel counts like so:

https://example.com/image-1.jpg?nf_resize=fit&w=500
https://example.com/image-1.jpg?nf_resize=fit&w=501
https://example.com/image-1.jpg?nf_resize=fit&w=502
https://example.com/image-1.jpg?nf_resize=fit&w=503
...

This is then multiplied by the number of images viewed of course:

https://example.com/image-1.jpg?nf_resize=fit&w=500
https://example.com/image-1.jpg?nf_resize=fit&w=501
https://example.com/image-1.jpg?nf_resize=fit&w=502
https://example.com/image-1.jpg?nf_resize=fit&w=503
...etc
https://example.com/image-2.jpg?nf_resize=fit&w=500
https://example.com/image-2.jpg?nf_resize=fit&w=501
https://example.com/image-2.jpg?nf_resize=fit&w=502
https://example.com/image-2.jpg?nf_resize=fit&w=503
...etc
https://example.com/image-3.jpg?nf_resize=fit&w=500
https://example.com/image-3.jpg?nf_resize=fit&w=501
https://example.com/image-3.jpg?nf_resize=fit&w=502
https://example.com/image-3.jpg?nf_resize=fit&w=503
...etc

That is only three images above but it shows 12 total image transformation. If those same 12 URLs were requested again in the same billing cycles it would not count as transformations.

I hope this is making it more clear. In other words, if you have 200 images and 10 different resolutions used that will be 2000 transformation - ten for each of the 200 images.

So, the count is not per request. The count is unique transformations per billing cycle.

I going to use the word again but if you search for “if” above, you’ll see I use that word often. I don’t know if any of that is true for your site. This is all just a best guess.

I also noticed something else where looking into this so I’m opening a support ticket to troubleshoot in more depth privately.

Please do reply here if you do not see an email about the support ticket soon (in the next few minutes).