Caching Youtube Thumbnails


I’m using Youtube video stills on my website as a way to “lazy load” the videos (when a user clicks the stills, then the video player is actually called). Right now, I’m using Youtube’s URL to grab the image({some video id}/maxresdefault.jpg). My question is whether Cloudflare can cache this image (doubtful…) or whether I would need to download the image to my server and then serve it through there in order for it to be cacheable.


1 Like

This would be the only solution.

CF doesn’t have control over so it can’t serve/cache the files from there.

In general, linking to the image shouldn’t be that expensive/slow. The only downside is the DNS lookup and TLS, which can maybe take 100ms of time depending on how fast the connection is to the Google DC and how fast the user’s DNS resolver is.

A test on Fiber to (disregard “blocked”)

You will load a little faster in terms of saving time by not doing DNS and TLS if you choose to re-host the thumbnail yourself. Cloudflare would then be able to cache that thumbnail for you.

1 Like

Thank you for confirming what I suspected!

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.