With Stackpath, we did not have to move the entire site to the Stackpath servers. We ONLY used it for assets. So in place of “…/images/image1.jpg”, we used the Stackpath url instead, something like//xn–s8f8a3c4-2p3d.stackpath.com/images/image1.jpg”. Stackpath would basically “crawl” our server for assets and I could “purge all” if I wanted to refresh everything. It was very easy and resulted in zero downtime. This would be the ideal scenario. It was adequate for our needs and I’m not convinced we need to move the whole site to the Cloudflare servers. We’d like to be able to use Cloudflare much like we did with Stackpath.
That’s not how Cloudflare works. Cloudflare is a reverse proxy that sits between you visitors und your server. Every time someone requests a page/an asset, the request is sent to Cloudflare.
Cloudflare then requests the asset from your server and a) serves it to the visitor and b) saves it for the next visitor, so it doesn’t have to be requested from the server again for some time.
Cloudflare does not crawl your website for assets, but only fetches them when a visitor requests the asset for the first time.
This basic functionality is free, but there is no guarantee on how long files stay in cache. Also, every Cloudflare data center (~300) will fetch assets from your server independently.
If you want a guarantee that every asset is only loaded from your server once (until it expires or you purge it), you can get the Cache Reserve Add-On.
Via cache rules, you can configure which types of assets you want to be cached.
If you don’t want all of your traffic to go through Cloudflare, but only images, there are options as well.
The easiest would be do add a new domain to Cloudflare, say images-example.com or cdn-example.com if example.com is your domain. You would then just have to make sure that your Origin responds to the new name, and change your images URL to the new domain.