Cameron Lewis
Cameron Lewis
CDCloudflare Developers
Created by Cameron Lewis on 8/5/2024 in #general-help
Can CF Image variants be pre-generated prior to an initial browser request?
I’m a developer who has implemented CF Images into an e-commerce website. I understand that in order for me to serve any image I have uploaded, each image URL needs to specify a variant, such as /public. However, after uploading a brand new image, it takes a very long while for the image to be viewed in a browser for the very first time. I'm guessing it's because the variant of that image needs to be created first. Then afterwards, it is much faster, across all browsers and computers. My question is if there is any way to pre-generate the variant of a particular image so that it doesn’t have to be created on-the-fly on an initial browser request? Or maybe I'm completely misunderstanding how variants work?
3 replies