I understand that for instance, the large media free tier allows for 2,500 transformations per month. What is considered a “transformation”? If I’m deploying a static website with a transformed image, does it get transformed (and I get billed) only once? In other words, are large media transformations “cached” for billing purposes? And if so does that reset every month and so if my site uses 200 transformations, I’ll have 200 used up at the beginning of every month?
TL;DR yes transformations are cached, for 30 days, and when served from that cache, will not cost extra for additional service (except the bandwidth usage). Here’s details about how we cache and charge:
- Large media has a separate s3 bucket that we cache transforms in for 30 days. (In other words, it’s not affected by caching timeouts or behaviors we do with other pages/assets - you can count on a specific transformation result to be cached for 30 days regardless of our standard CDN node caching status).
- We also cache on our CDN nodes the same way we handle caching for all other assets. (This also adds an extra layer of performance boost, where if a user is browsing your site on a single CDN node, it won’t have to go to S3 to re-fetch the transformed image.)
- If a large media transformation result is found in either cache already, then the user is not charged for an additional transformation.
- Every combination of file (checked by SHA, not just filename, since you may upload a new image with the same filename) and transform parameters requires a unique transformation call. So if you request
mypic.jpg?nf_resize=fit&w=300and then request
mypic.jpg?nf_resize=fit&w=301, we can’t use the first cached image, and have to do a new transformation. Similarly, if you upload a new version of
mypic.jpg, and then make the above requests again, we’ll have to do two more transformations.
Thanks for the reply! So if I’m following, if I have 50 images on my website using transforms, I will have 50 transforms used up per monthly billing cycle correct?
as long as you don’t use multiple resolutions (e.g. depending on screen size), sounds like that should be right!