WebP Cloud compared with Cloudflare Polish
To make the images on your pages smaller and load faster, different vendors have their own approaches. This article will compare WebP Cloud and Cloudflare Polish in terms of “cache features,” “ease of use,” “pricing,” and “supported features.”
Introduction
WebP Cloud
WebP Cloud is specifically designed for image processing. It compresses original images into formats like WebP/AVIF, significantly reducing their size to improve loading speed. Additionally, it removes image metadata to minimize privacy leaks. WebP Cloud also supports features such as watermarking, image resizing, and retrieving image metadata, fully catering to all image display needs on a website.
WebP Cloud’s services are backed by the European provider Hetzner, allowing us to offer a cost-effective service compared to similar products, with data stored in Germany in compliance with EU data processing regulations.
Cloudflare Polish
Cloudflare Polish is a one-click image optimization product that automatically optimizes images in your site. Polish strips metadata from images and reduces image size through lossy or lossless compression to accelerate the speed of image downloads.
When an image is fetched from your origin, our systems automatically optimize it in Cloudflare’s cache. Subsequent requests for the same image will get the smaller, faster, optimized version of the image, improving the speed of your website.
Pricing
WebP Cloud
WebP Cloud charges based on usage. As of the writing of this article, WebP Cloud’s pricing is as follows:
Always Free | Lite | Plus | Custom Plan | |
---|---|---|---|---|
Free | 3 USD/mo | 10 USD/mo | Custom | |
👏 Scale | ||||
Cache | 200 MiB / proxy | 1024 MiB / proxy | 4096 MiB / proxy | Custom |
Bandwidth | Unlimited | Unlimited | Unlimited | Unlimited |
Daily request quota * | 3,000 | 8,000 | 30,000 | Custom |
Proxies per user | 3 | 6 | 10 | Unlimited |
Cloudflare Polish
Cloudflare Polish is not a standalone product. If you purchase the Cloudflare Pro Plan (25 USD per month), you get this feature at no additional cost.
Cache Features
WebP Cloud
WebP Cloud provides different cache spaces for users based on their plan. Image requests are cached by WebP Cloud’s system (in the region where the proxy is located) after the first successful access. As long as the cache is not full, all subsequent requests to the same URL will be served from the cache, eliminating any additional traffic to your origin server.
Cloudflare Polish
Cloudflare Polish, being a Cloudflare product, shares the same caching rules as Cloudflare CDN, namely:
When the cache wants to store a new object but does not have room, it uses an algorithm called Least Recently Used, or LRU, to nominate an object to evict and replace it with the new one. An object’s cache retention period refers to the duration the object is stored in Cloudflare’s cache before being evicted. It is worth noting that an object’s retention period is a function of its relative popularity and the size of Cloudflare’s caches, and therefore is not configurable.
Source: https://developers.cloudflare.com/cache/concepts/retention-vs-freshness
Additionally, Cloudflare’s cache is independent for each data center. The list of Cloudflare’s data centers can be found at https://www.cloudflare.com/network/. For example, when you visit this URL, you might see something like this in the request headers:
cf-ray 8e4xxxxxxxx4ce6f-SIN
Here, SIN
refers to Cloudflare’s Singapore data center, meaning your request was served by this data center.
When an image is cached by a data center (and not evicted), subsequent visitors to that data center will receive the cached image. However, if the cache is evicted or a visitor hits a different data center, Cloudflare will fetch the original image from your origin server again, causing additional response time and traffic overhead.
Conversion Features
WebP Cloud
WebP Cloud fetches the original image from the origin server and converts it to WebP on the first request. It then serves the smallest image format supported by the visitor’s browser among the original, WebP, and AVIF formats.
Since AVIF conversion is resource-intensive but offers better compression efficiency than WebP, our system continues to try converting the original image to AVIF in the background. Once the conversion is complete, subsequent visits will receive the smallest image format supported by the visitor’s browser.
For more details on our AVIF image processing, refer to the article “WebP Cloud Services Now Support AVIF.”
Cloudflare Polish
In our experience with Cloudflare Polish, we found the following undocumented limitations:
- Requests must be GET requests ending in
.jpg
or.png
, not POST requests or URLs like?url=xxxxx.jpg
. These requests will not be processed by Polish. - Images are not converted on the first request. For example, multiple requests for the same image returned the following headers:
First request, returned the original image, cf-cache-status: MISS
HTTP/2 200
content-type: image/png
content-length: 967609
etag: W/"ec3b9-1930a2c9c6b"
cf-cache-status: MISS
cf-ray: xxxxxxxxxxxxxxxx-SIN
Second request, still the original image, cf-cache-status: EXPIRED
HTTP/2 200
content-type: image/png
content-length: 967609
etag: W/"ec3b9-1930a2c9c6b"
cf-cache-status: EXPIRED
cf-ray: xxxxxxxxxxxxxxxx-SIN
Third request, returned the optimized WebP image
HTTP/2 200
content-type: image/webp
content-length: 574634
cf-bgj: imgq:85,h2pri
cf-polished: origFmt=png, origSize=967609
content-disposition: inline; filename="image--1-.webp"
vary: Accept
etag: W/"ec3b9-1930a2c9c6b"
cf-cache-status: HIT
age: 12
accept-ranges: bytes
cf-ray: xxxxxxxxxxxxxxxx-SIN
In this test, Cloudflare Polish returned the optimized WebP image starting from the third request.
Ease of Use
WebP Cloud
Unlike Polish, using WebP Cloud requires adding your origin server address in the Dashboard and using the new address assigned by WebP Cloud. For example, if your origin address is https://image-storage.your-domain.tld
, after creating a Proxy, we will assign you an address like https://abc123.webp.li
(if in the US region). If the original image is at https://image-storage.your-domain.tld/image.png
, you can access the optimized image via https://abc123.webp.li/image.png
.
Since this uses a new address, some additional steps are needed to make your site use the new address for images. Our documentation provides specific recommendations for different websites on the “Access” page.
Cloudflare Polish
If your domain is already hosted on Cloudflare, enabling Polish is very convenient. You just need to enable it in the Dashboard:
Once enabled, if your image links end in .jpg
, you will receive optimized images after a few requests.
Of course, if your domain is not using Cloudflare as the CDN, the prerequisite for using Polish is to add your domain to the Cloudflare network, which involves changing the NS records and potential service downtime.
Summary
Let’s summarize the differences between WebP Cloud and Cloudflare Polish.
In terms of pricing, if you have a large number of image requests, Cloudflare Polish offers better cost efficiency with a fixed monthly price. However, note that Polish does not guarantee optimized images on the first request. Considering Cloudflare’s distributed data centers, a visitor who accesses an optimized image in one region does not guarantee the same for other regions (since caches are not shared across data centers) or even for subsequent visitors in the same region (due to potential cache expiration). In contrast, WebP Cloud provides stable cache space and can cache optimized images on the first request for any subsequent accesses, reducing origin bandwidth consumption and conversion time.
In terms of ease of use, if your domain is already hosted on Cloudflare, using Cloudflare Polish is very simple. You just need to enable it in the Dashboard (otherwise, you need to first change the NS records and perform other operations to add the domain to Cloudflare). For WebP Cloud, there is no need to change NS records or perform similar operations; you just need to do some one-time configuration (even if using a custom domain, it only involves adding CNAME and TXT records).
In terms of features, Cloudflare Polish can only convert PNG/JPG images to WebP format (optionally lossy or lossless). WebP Cloud supports converting PNG/JPG/HEIC/GIF images to WebP/AVIF formats, with customizable conversion quality, watermarking, thumbnail generation, and image metadata retrieval, making it especially beneficial for users who want to store images in one place and use different formats for different purposes.
The WebP Cloud Services team is a small team of three individuals from Shanghai and Helsingborg. Since we are not funded and have no profit pressure, we remain committed to doing what we believe is right. We strive to do our best within the scope of our resources and capabilities. We also engage in various activities without affecting the services we provide to the public, and we continuously explore novel ideas in our products.
If you find this service interesting, feel free to log in to the WebP Cloud Dashboard to experience it. If you’re curious about other magical features it offers, take a look at our WebP Cloud Services Docs. We hope everyone enjoys using it!
Discuss on Hacker News