Search code examples
imagecloudflare

Cloudflare Images vs Images Cached via Cloudflare, What is the difference?


I am just testing the Cloudflare Images service. I just wonder what is the advantage of Cloudflare Images over images cached by Cloudflare.

I made a test on both cases.

  1. Upload an image to Cloudflare Images. Then test it via GTMetrix. The report is at https://gtmetrix.com/reports/www.datanumen.com/z8oq3z24/

enter image description here

  1. UPload an image to a domain proxied by Cloudflare. The report is at https://gtmetrix.com/reports/www.datanumen.com/aqBwu5Pd/

enter image description here

From the test results, we can see both images are "MISS", but image hosted on Cloudflare Images(from https://imagedelivery.net/) will take about 10 times(2.5s) to load than image hosted on a domain proxied by Cloudflare.

So, based on the above test results, Cloudflare Images has no advantage in performance at all?


Solution

  • Cloudflare images service offers more than just optimized speed. It's more of a single point of storage and management for images including the added benefit of cached delivery

    They also offer paid options for resizing and further optimizations (Polish), This is where major differences in performance if any will really show.

    However, for your specific scenario, I can see that the image delivered from Cloudflare was in AVIF format, and from the site it was a regular PNG image which was larger in size as well.

    Based on documentation from Cloudflare, conversion to AVIF or WebP formats is a compute-intensive task, which could explain the major time difference here. Take a look at the FAQs

    ​​Can Cloudflare Images convert my images to AVIF or WebP?

    Yes. Based on the Accept HTTP request header Cloudflare Images will be served in AVIF or WebP format. The transformation of an image to AVIF is compute-intensive but leads to a significant benefit in file-size. We are always weighing cost and benefit when deciding on which format to serve.