to generate query param transformations. One observation is that when one or more query param changes value, the request takes quite some time where TTFB is pretty much all of the wait time.• Is anyone else experiencing this? • Does it just take that long to generate a new version of an image server side maybe? • Is there something that can be optimized in our transformations query params? Example image url we have: https://cdn.sanity.io/images/ <project-id>/<dataset>/<some-img>.png?rect=750,0,1406,1438&w=1112&h=1137&auto=format After the initial long running request, requests for the same image with the same params are quick.
Jan 21, 2021, 7:30 AM
Yes indeed, if the image size you are requesting is not cached by the CDN it will take some time to generate the image and send it over to CDN. Therefore we strongly recommend using predefined srcsets with a set of predefined image sizes for various display, and not rely on creating unique images for every viewport width.