How Cloudflare handles images and videos for CDN

HI threre,

I am trying to understand how cloudfare handles my images and videos. Actually I am planning to use CDN for images and videos.
1 -Will I have to upload my images and videos on cloudfare or it will be served directly from my hosting service.
2- And it is covered under free plan or not?.

Shehzad Asif
Front End Developer

No need. Cloudflare is a Pull CDN, which means it will fetch resources from your server when the first visitor visits your website, and then the resources will be cached in the CDN.

Yes. Free plan does cover that, with limited customization capabilities (e.g. the duration of cache TTL, image compression not on free plan, etc.)

Just be aware that Terms of Service 2.8 prohibits using Cloudflare primarily for video and images.

1 Like

I just got more confused by the two replies. Which one is right?. So far what I understood is that I cannot used cloudfare for images and videos cdn or cashing under free plan. Is that right?

You cannot upload them to CloudFlare.

Rather, put them on some storage bucket like Google Cloud Storage. It has it’s own cache settings and even you can have SSL from them.

Moreover, you can setup your GCS bucket to use your sub-domain as a CNAME record in the CloudFlare DNS dashboard to pull your GCS content, and add Page Rule on CloudFlare for it so the resources will be cached too (if you want so save some money on egress network bandwidth for requesting them all the time).

Also, keep in mind, I am not sure about the policy and regarding the, if so, streaming over HTTPS with CloudFlare …

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.