
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Tue, 14 Apr 2026 15:14:24 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Uncovering the Hidden WebP vulnerability: a tale of a CVE with much bigger implications than it originally seemed]]></title>
            <link>https://blog.cloudflare.com/uncovering-the-hidden-webp-vulnerability-cve-2023-4863/</link>
            <pubDate>Thu, 05 Oct 2023 15:00:43 GMT</pubDate>
            <description><![CDATA[ Google announced a security issue in Chrome titled "Heap buffer overflow in WebP in Google Chrome." At first it seemed like just another bug, but has implications that extended well beyond Chrome. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>At Cloudflare, we're constantly vigilant when it comes to identifying vulnerabilities that could potentially affect the Internet ecosystem. Recently, on September 12, 2023, Google announced a security issue in Google Chrome, titled "Heap buffer overflow in WebP in Google Chrome," which caught our attention. Initially, it seemed like just another bug in the popular web browser. However, what we discovered was far more significant and had implications that extended well beyond Chrome.</p>
    <div>
      <h3>Impact much wider than suggested</h3>
      <a href="#impact-much-wider-than-suggested">
        
      </a>
    </div>
    <p>The vulnerability, tracked under <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-4863">CVE-2023-4863</a>, was described as a heap buffer overflow in WebP within Google Chrome. While this description might lead one to believe that it's a problem confined solely to Chrome, the reality was quite different. It turned out to be a bug deeply rooted in the libwebp library, which is not only used by Chrome but by virtually every application that handles WebP images.</p><p>Digging deeper, this vulnerability was in fact first reported in an earlier CVE from Apple, CVE-2023-41064, although the connection was not immediately obvious. In early September, Citizen Lab, a research lab based out of the University of Toronto, reported on an apparent exploit that was being used to attempt to install spyware on the iPhone of "an individual employed by a Washington DC-based civil society organization." The advisory from Apple was also incomplete, stating that it was a “buffer overflow issue in ImageIO,” and that they were aware the issue may have been actively exploited. Only after Google released CVE-2023-4863 did it become clear that these two issues were linked, and there was a wider vulnerability in WebP.</p><p>The vulnerability allows an attacker to create a malformed WebP image file that makes libwebp write data beyond the buffer memory allocated to the image decoder. By writing past the legal bounds of the buffer, it is possible to modify sensitive data in memory, eventually leading to execution of the attacker's code.</p><p>WebP, introduced over a decade ago, has gained widespread adoption in various applications, ranging from web browsers to email clients, chat apps, graphics programs, and even operating systems. This ubiquity meant that this vulnerability had far-reaching consequences, affecting a vast array of software and virtually all users of the WebP format.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1VR5ms2oG6429Y6D8F3Hic/80023d781031236142015576080767c1/image2-3.png" />
            
            </figure><p><i>How the WebP vulnerability is exploited</i></p>
    <div>
      <h3>Understanding the technical details</h3>
      <a href="#understanding-the-technical-details">
        
      </a>
    </div>
    <p>So what exactly was the issue, how could it be exploited, and how was it shut down? We can get our best clues by looking at <a href="https://chromium.googlesource.com/webm/libwebp/+/902bc9190331343b2017211debcec8d2ab87e17a%5E%21/#F0">the patch that was made to libwebp</a>. This patch fixes a potential out-of-buffer (OOB) error in part of the image decoder – the Huffman tables – with two changes: additional validation of the input data, and a modified dynamic memory allocation model. A deeper dive into libwebp and the WebP image format built on top of it reveals what this means.</p><p>WebP is a combination of two different image formats: a lossy format similar to JPEG using VP8 codec, and a lossless format using WebP's custom lossless codec. The bug was in the lossless codec's handling of Huffman coding.</p><p>The fundamental idea behind Huffman coding is that using a constant number of bits for every basic unit of information in a dataset – like a pixel color – is not the most efficient representation. We can use a variable number of bits, and assign shortest sequences to the most frequently occurring values, and longer ones to the least common values. The sequences of ones and zeros can be represented as a binary tree, with the shorter, more common codes near the root, and longer, less common codes deeper in the tree. Looking up values in the tree bit by bit is relatively slow. Practical implementations build lookup tables that allow matching many bits at a time.</p><p>Image files contain compact information about the shape of the Huffman tree, which the decoder uses to reconstruct the tree, and build lookup tables for the codes. The bug in libwebp was in the code building the lookup tables. A specially crafted WebP file can contain a very unbalanced Huffman tree that contains codes much longer than any normal WebP file would have, and this made the function generating lookup tables write data beyond the buffer allocated for the lookup tables. Libwebp had checks for validity of the Huffman tree, but it would write the invalid lookup tables before the consistency check.</p><p>The buffer for lookup tables is allocated on the heap. Heap is an area of memory where most of the data of the application is stored. Code that writes data past its buffer allows attackers to modify and corrupt data that happens to be adjacent in memory to the buffer. This can be exploited to make the application misbehave, and eventually start executing code supplied by the attacker.</p><p>The fixed version of libwebp ensures that the input data will always create a valid internal structure, and if so, allocates more memory if necessary to ensure the buffer is always big enough.</p><p>Libwebp is a mature library, maintained by seasoned professionals. But it's written in the C language, which has very few safeguards against programming errors, especially memory use. Despite the care taken in the library's development, a single erroneous assumption led to a critical vulnerability.</p>
    <div>
      <h3>Swift action</h3>
      <a href="#swift-action">
        
      </a>
    </div>
    <p>On the same day that Google's announcement caught our attention, we filed an internal security ticket, to document and address the vulnerability.</p><p>Google was initially perplexed about the true source of the problem. They did not release a patched version of libwebp before announcing the vulnerability. We discovered the yet-unreleased patch for libwebp in its repository, and used it to update libwebp in our services. libwebp officially released the patch a day later.</p><p>Our image processing services are written in Rust. We've submitted patches to Rust packages that contained a copy of libwebp and filed RustSec advisories for them (<a href="https://rustsec.org/advisories/RUSTSEC-2023-0061.html">RUSTSEC-2023-0061</a> and <a href="https://rustsec.org/advisories/RUSTSEC-2023-0062.html">RUSTSEC-2023-0062</a>). This ensured that the broader Rust ecosystem was informed and could take appropriate action.</p><p>In an interesting turn of events, GitHub's vulnerability scanner was quick to recognize our RustSec reports as the first case of CVE-2023-4863, even before the issue gained widespread attention. This highlights the importance of having robust security reporting mechanisms in place and the vital role that platforms like GitHub play in <a href="https://www.cloudflare.com/the-net/oss-attack-detection/">keeping the open-source community secure</a>.</p><p>These quick actions demonstrate how seriously Cloudflare takes this kind of threat. We have a belt-and-suspenders approach to security that limits the binaries we run at our edge to those signed by us, and ensures that all vulnerabilities are identified and remedied as soon as possible. In this case, we have scrutinized our logs, and found no evidence that any attackers attempted to leverage this vulnerability against Cloudflare. We believe this exploit targeted individuals rather than the infrastructure of a company like Cloudflare, but we never take chances with our customers’ data, and so fixed this vulnerability as quickly as possible, before it became well known.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Google has now widened its description of this issue, correctly calling out that all uses of WebP are potentially affected. This widened description was originally filed as yet another new CVE – <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-5129">CVE-2023-5129</a> – but then that was flagged as a duplicate of the original CVE-2023-4863, and the description of the earlier filing updated. This incident serves as a reminder of the complex and interconnected nature of the Internet ecosystem. What initially seemed like a Chrome-specific problem revealed a much deeper issue that touched nearly every corner of the digital world. The incident also showcased the importance of swift collaboration and the critical role that responsible disclosure plays in mitigating security risks.</p><p>For each and every user, it demonstrates the need to keep all browsers, apps and operating systems up to date, and to install recommended security patches. All applications supporting WebP images need to be updated. We've updated our services.</p><p>At Cloudflare, we remain committed to enhancing the security of the Internet, and incidents like these drive us to continually refine our processes and strengthen our partnerships within the global developer community. By working together, we can make the Internet a safer place for everyone.</p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Chrome]]></category>
            <category><![CDATA[WebP]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Swift]]></category>
            <guid isPermaLink="false">5nwTZ5NB8OAO51Ut53JB1B</guid>
            <dc:creator>Willi Geiger</dc:creator>
            <dc:creator>Kornel Lesiński</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing support for the AVIF image format]]></title>
            <link>https://blog.cloudflare.com/generate-avif-images-with-image-resizing/</link>
            <pubDate>Sat, 03 Oct 2020 13:00:00 GMT</pubDate>
            <description><![CDATA[ We're adding support for the new AVIF image format. It compresses images significantly better than older-generation formats such as WebP and JPEG. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7pur7e2GCh3MalSZMrQS7q/10a180152a825d811ae832347dad8b66/BDES-1080_Cloudflare_Resize_Illustration_AV1-AVIF_Blog_Header.png" />
            
            </figure><p>We've added support for the new AVIF image format in <a href="https://developers.cloudflare.com/images/">Image Resizing</a>. It compresses images significantly better than older-generation formats such as WebP and JPEG. It's supported in Chrome desktop today, and support is coming to other Chromium-based browsers, as well as Firefox.</p>
    <div>
      <h3>What’s the benefit?</h3>
      <a href="#whats-the-benefit">
        
      </a>
    </div>
    <p>More than a half of an average website's bandwidth is spent on images. Improved <a href="https://www.cloudflare.com/learning/performance/glossary/what-is-image-compression/">image compression</a> can save bandwidth and improve overall performance of the web. The compression in AVIF is so good that images can reduce to half the size of JPEG and WebP</p>
    <div>
      <h3>What is AVIF?</h3>
      <a href="#what-is-avif">
        
      </a>
    </div>
    <p>AVIF is a combination of the HEIF ISO standard, and a royalty-free AV1 codec by <a href="https://aomedia.org/">Mozilla, Xiph, Google, Cisco, and many others</a>.</p><p>Currently, JPEG is the most popular image format on the Web. It's doing remarkably well for its age, and it will likely remain popular for years to come thanks to its excellent compatibility. There have been many previous attempts at replacing JPEG, such as JPEG 2000, JPEG XR and WebP. However, these formats offered only modest compression improvements, and didn't always beat JPEG on image quality. Compression and image quality in <a href="https://netflixtechblog.com/avif-for-next-generation-image-coding-b1d75675fe4">AVIF is better than in all of them, and by a wide margin</a>.</p><table>
<tr>
<td>
    <img src="http://staging.blog.mrk.cfdata.org/content/images/2021/11/avif-test-timothy-meinberg.jpeg" />
</td>
<td>
    
    
    <img src="https://images.ctfassets.net/slt3lc6tev37/4JGMoM6h1eV1YAv8N3QnRC/7e61ac8dfe6836ce46d347311993c50b/avif-test-timothy-meinberg.webp" />
    
</td>
<td>
    
    
    <img src="http://staging.blog.mrk.cfdata.org/content/images/2021/11/avif-test-timothy-meinberg.avif.png" />
    
</td>
</tr>
<tr>
    <td>JPEG (17KB)</td>
    <td>WebP (17KB)</td>
    <td>AVIF (17KB)</td>
</tr>
</table>
    <div>
      <h3>Why a new image format?</h3>
      <a href="#why-a-new-image-format">
        
      </a>
    </div>
    <p>One of the big things AVIF does is it fixes WebP's biggest flaws. WebP is over 10 years old, and AVIF is a major upgrade over the WebP format. These two formats are technically related: they're both based on a video codec from the VPx family. WebP uses the old VP8 version, while AVIF is based on AV1, which is the next generation after <a href="https://en.wikipedia.org/wiki/VP10">VP10</a>.</p><p>WebP is limited to 8-bit color depth, and in its best-compressing mode of operation, it can only store color at half of the image's resolution (known as chroma subsampling). This causes edges of saturated colors to be smudged or pixelated in WebP. AVIF supports 10- and 12-bit color at full resolution, and high dynamic range (HDR).</p><table>
<tr><td><img src="http://staging.blog.mrk.cfdata.org/content/images/2020/10/avif-test-jpeg1.png" /></td><td>JPEG</td></tr>
<tr><td><img src="http://staging.blog.mrk.cfdata.org/content/images/2020/10/avif-test-webp1.png" /></td><td>WebP</td></tr>
<tr><td><img src="http://staging.blog.mrk.cfdata.org/content/images/2020/10/avif-test-webp2.png" /></td><td>WebP (sharp YUV option)</td></tr>
<tr><td><img src="http://staging.blog.mrk.cfdata.org/content/images/2020/10/avif-test-avif1.png" /></td><td>AVIF</td></tr>
</table><p>AV1 also uses a new compression technique: chroma-from-luma. Most image formats store brightness separately from color hue. AVIF uses the brightness channel to guess what the color channel may look like. They are usually correlated, so a good guess gives smaller file sizes and sharper edges.</p>
    <div>
      <h3>Adoption of AV1 and AVIF</h3>
      <a href="#adoption-of-av1-and-avif">
        
      </a>
    </div>
    <p>VP8 and WebP suffered from reluctant industry adoption. Safari only added WebP support very recently, 10 years after Chrome.</p><p>Chrome 85 supports AVIF already. It’s a work in progress in other Chromium-based browsers, and Firefox. Apple hasn't announced whether Safari will support AVIF. However, this time Apple is one of the <a href="https://aomedia.org/membership/members/">companies in the Alliance for Open Media</a>, creators of AVIF. The AV1 codec is already seeing faster adoption than the previous royalty-free codecs. Latest GPUs from Nvidia, AMD, and Intel already have hardware decoding support for AV1.</p><p>AVIF uses the same HEIF container as the HEIC format used in iOS’s camera. AVIF and HEIC offer similar compression performance. The difference is that HEIC is based on a commercial, patent-encumbered H.265 format. In countries that allow software patents, H.265 is illegal to use without obtaining patent licenses. It's covered by thousands of patents, owned by hundreds of companies, which have fragmented into two competing licensing organizations. Costs and complexity of patent licensing used to be acceptable when videos were published by big studios, and the cost could be passed on to the customer in the price of physical discs and hardware players. Nowadays, when video is mostly consumed via free browsers and apps, <a href="https://blog.chiariglione.org/a-future-without-mpeg/">the old licensing model has become unsustainable</a>. This has created a huge incentive for Web giants like Google, Netflix, and Amazon to get behind the royalty-free alternative. AV1 is free to use by anyone, and the alliance of tech giants behind it will <a href="http://aomedia.org/press%20releases/the-alliance-for-open-media-statement/">defend it</a> from patent troll's lawsuits.</p><p>Non-standard image formats usually can only be created using their vendor's own implementation. AVIF and AV1 are already ahead with multiple independent implementations: libaom, Intel SVT-AV1, libgav1, dav1d, and rav1e. This is a sign of a healthy adoption and a prerequisite to be a Web standard. Our Image Resizing is implemented in <a href="https://www.rust-lang.org/">Rust</a>, so we've chosen the <a href="https://github.com/xiph/rav1e">rav1e</a> encoder to create a pure-Rust implementation of AVIF.</p>
    <div>
      <h3>Caveats</h3>
      <a href="#caveats">
        
      </a>
    </div>
    <p>AVIF is a feature-rich format. Most of its features are for smartphone cameras, such as "live" photos, depth maps, bursts, HDR, and lossless editing. Browsers will support only a fraction of these features. In our implementation in Image Resizing we’re supporting only still standard-range images.</p><p>Two biggest problems in AVIF are encoding speed and lack of progressive rendering.</p><p>AVIF images don't show anything on screen until they're fully downloaded. In contrast, a progressive JPEG can display a lower-quality approximation of the image very quickly, while it's still loading. <a href="/parallel-streaming-of-progressive-images/">When progressive JPEGs are delivered well</a>, they make websites appear to load much faster. Progressive JPEG can look loaded at half of its file size. AVIF can fully load at half of JPEG's size, so it somewhat overcomes the lack of progressive rendering with the sheer compression advantage. In this case only WebP is left behind, which has neither progressive rendering nor strong compression.</p><p>Decoding AVIF images for display takes relatively more CPU power than other codecs, but it should be fast enough in practice. Even low-end Android devices can play AV1 videos in full HD without help of hardware acceleration, and AVIF images are just a single frame of an AV1 video. However, encoding of AVIF images is much slower. It may take even a few seconds to create a single image. AVIF supports tiling, which accelerates encoding on multi-core CPUs. We have <a href="/cloudflares-gen-x-servers-for-an-accelerated-future/">lots of CPU cores</a>, so we take advantage of this to make encoding faster. Image Resizing doesn’t use the maximum compression level possible in AVIF to further increase compression speed. Resized images are cached, so the encoding speed is noticeable only on a cache miss.</p><p>We will be adding AVIF support to <a href="https://support.cloudflare.com/hc/en-us/articles/360000607372-Using-Cloudflare-Polish-to-compress-images">Polish</a> as well. Polish converts images asynchronously in the background, which completely hides the encoding latency, and it will be able to compress AVIF images better than Image Resizing.</p>
    <div>
      <h3>Note about benchmarking</h3>
      <a href="#note-about-benchmarking">
        
      </a>
    </div>
    <p>It's surprisingly difficult to fairly and accurately judge which lossy codec is better. Lossy codecs are specifically designed to mainly <a href="https://www.cloudflare.com/learning/performance/glossary/what-is-image-compression/">compress image details</a> that are too subtle for the naked eye to see, so "looks almost the same, but the file size is smaller!" is a common feature of all lossy codecs, and not specific enough to draw conclusions about their performance.</p><p>Lossy codecs can't be compared by comparing just file sizes. Lossy codecs can easily make files of any size. Their effectiveness is in the ratio between file size and visual quality they can achieve.</p><p>The best way to compare codecs is to make each compress an image to the exact same file size, and then to compare the actual visual quality they've achieved. If the file sizes differ, any judgement may be unfair, because the codec that generated the larger file may have done so only because it was asked to preserve more details, not because it can't compress better.</p>
    <div>
      <h3>How and when to enable AVIF today?</h3>
      <a href="#how-and-when-to-enable-avif-today">
        
      </a>
    </div>
    <p>We recommend AVIF for websites that need to deliver high-quality images with as little bandwidth as possible. This is important for users of slow networks and in <a href="https://whatdoesmysitecost.com/">countries where the bandwidth is expensive</a>.</p><p>Browsers that support the AVIF format announce it by adding <code>image/avif</code> to their <code>Accept</code> request header. To request the AVIF format from <a href="https://developers.cloudflare.com/images/">Image Resizing</a>, set the <code>format</code> option to <code>avif</code>.</p><p>The best method to detect and enable support for AVIF is to use <a href="https://developers.cloudflare.com/images/worker">image resizing in Workers</a>:</p>
            <pre><code>addEventListener('fetch', event =&gt; {
  const imageURL = "https://jpeg.speedcf.com/cat/4.jpg";

  const resizingOptions = {
    // You can set any options here, see:
    // https://developers.cloudflare.com/images/worker
    width: 800,
    sharpen: 1.0,
  };

  const accept = event.request.headers.get("accept");
  const isAVIFSupported = /image\/avif/.test(accept);
  if (isAVIFSupported) {
    resizingOptions.format = "avif";
  }
  event.respondWith(fetch(imageURL), {cf:{image: resizingOptions}})
})</code></pre>
            <p>The above script will auto-detect the supported format, and serve AVIF automatically. Alternatively, you can use URL-based resizing together with the <code>&lt;picture&gt;</code> element:</p>
            <pre><code>&lt;picture&gt;
    &lt;source type="image/avif" 
            srcset="/cdn-cgi/image/format=avif/image.jpg"&gt;
    &lt;img src="/image.jpg"&gt;
&lt;/picture&gt;</code></pre>
            <p>This uses our <a href="https://developers.cloudflare.com/images/about"><code>/cdn-cgi/image/…</code></a> endpoint to perform the conversion, and the alternative source will be picked only by browsers that support the AVIF format.</p><p>We have the <code>format=auto</code> option, but it won't choose AVIF yet. We're cautious, and we'd like to test the new format more before enabling it by default.</p> ]]></content:encoded>
            <category><![CDATA[Optimization]]></category>
            <category><![CDATA[WebP]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">49mNQJofaty5LTpZMvcjPb</guid>
            <dc:creator>Kornel Lesiński</dc:creator>
        </item>
        <item>
            <title><![CDATA[A Very WebP New Year from Cloudflare]]></title>
            <link>https://blog.cloudflare.com/a-very-webp-new-year-from-cloudflare/</link>
            <pubDate>Wed, 21 Dec 2016 14:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare has an automatic image optimization feature called Polish, available for paid plan users. It recompresses images and stripping excess data, speeding up delivery to browsers. ]]></description>
            <content:encoded><![CDATA[ <p>Cloudflare has an automatic image optimization feature called <a href="/introducing-polish-automatic-image-optimizati/">Polish</a>, available to customers on paid plans. It recompresses images and removes unnecessary data so that they are delivered to browsers more quickly.</p><p>Up until now, Polish has not changed image types when optimizing (even if, for example, a PNG might sometimes have been smaller than the equivalent JPEG). But a new feature in Polish allows us to swap out an image for an equivalent image compressed using Google’s WebP format when the browser is capable of handling WebP and delivering that type of image would be quicker.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6RCs2VzrEL7pYO3RNWBRYa/5434d04bd47f702aa548ea48985c2aff/holly.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by/2.0/">CC-BY 2.0</a> <a href="https://www.flickr.com/photos/john47kent/5307525503/">image</a> by <a href="https://www.flickr.com/photos/john47kent/">John Stratford</a></p>
    <div>
      <h3>What is WebP?</h3>
      <a href="#what-is-webp">
        
      </a>
    </div>
    <p>The main image formats used on the web haven’t changed much since the early days (apart from the SVG vector format, PNG was the last one to establish itself, <a href="https://en.wikipedia.org/wiki/Portable_Network_Graphics#History_and_development">almost two decades ago</a>).</p><p><a href="https://en.wikipedia.org/wiki/WebP">WebP</a> is a newer image format for the web, proposed by Google. It takes advantage of progress in <a href="https://www.cloudflare.com/learning/performance/glossary/what-is-image-compression/">image compression techniques</a> since formats such as JPEG and PNG were designed. It is often able to compress the images into a significantly smaller amount of data than the older formats.</p><p>WebP is versatile and able to replace the three main raster image formats used on the web today:</p><ul><li><p>WebP can do lossy compression, so it can be used instead of JPEG for photographic and photo-like images.</p></li><li><p>WebP can do lossless compression, and supports an alpha channel meaning images can have transparent regions. So it can be used instead of PNG, such as for images with sharp transitions that should be reproduced exactly (e.g. line art and graphic design elements).</p></li><li><p>WebP images can be animated, so it can be used as a replacement for animated GIF images.</p></li></ul><p>Currently, the main browser that supports WebP is Google’s Chrome (both on desktop and mobile devices). See <a href="http://caniuse.com/#feat=webp">the WebP page on caniuse.com</a> for more details.</p>
    <div>
      <h3>Polish WebP conversion</h3>
      <a href="#polish-webp-conversion">
        
      </a>
    </div>
    <p>Customers on the Pro, Business, and Enterprise plans can enable the automatic creation of WebP images by checking the WebP box in the Polish settings for a zone (these are found on the “Speed” page of the dashboard):</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Beloplqsl1SNVyjFSOyl4/d6853afc514b5a6fc9cf94758d629695/polish-webp.png" />
            
            </figure><p>When this is enabled, Polish will optimize images just as it always has. But it will also convert the image to WebP, if WebP can shrink the image data more than the original format. These WebP images are only returned to web browsers that indicate they support WebP (e.g. Google Chrome), so most websites using Polish should be able to benefit from WebP conversion.</p><p>(Although Polish can now produce WebP images by converting them from other formats, it can't consume WebP images to optimize them. If you put a WebP image on an origin site, Polish won't do anything with it. Until the WebP ecosystem grows and matures, it is uncertain that attempting to optimize WebP is worthwhile.)</p><p>Polish has two modes: <i>lossless</i> and <i>lossy</i>. In lossless mode, JPEG images are optimized to remove unnecessary data, but the image displayed is unchanged. In lossy mode, Polish reduces the quality of JPEG images in a way that should not have a significant visible effect, but allows it to further reduce the size of the image data.</p><p>These modes are respected when JPEG images are converted to WebP. In lossless mode, the conversion is done in a way that preserves the image as faithfully as possible (due to the nature of the conversion, the resulting WebP might not be exactly identical, but there are unlikely to be any visible differences). In lossy mode, the conversion sacrifices a little quality in order to shrink the image data further, but as before, there should not be a significant visible effect.</p><p>These modes do not affect PNGs and GIFs, as these are lossless formats and so Polish will preserve images in those formats exactly.</p><p>Note that WebP conversion does not change the URLs of images, even if the file extension in the URL implies a different format. For example, a JPEG image at <code>https://example.com/picture.jpg</code> that has been converted to WebP will still have that same URL. The “Content-Type” HTTP header tells the browser the true format of an image.</p>
    <div>
      <h3>By the Numbers</h3>
      <a href="#by-the-numbers">
        
      </a>
    </div>
    <p>A few studies have been published of how well WebP compresses images compared with established formats. These studies provide a useful picture of how WebP performs. But before we released our WebP support, we decided to do a survey based on the context on which we planned to use WebP:</p><ul><li><p>We evaluated WebP based on a collection of images gathered from the websites of our customers. The corpus consisted of 23,500 images (JPEG, PNG and GIFs).</p></li><li><p>Some studies compare WebP with JPEG by taking uncompressed images and compressing them to JPEG and WebP directly. But we wanted to know what happens when we convert an image that was has already been compressed as a JPEG. In a sense this is an unfair test, because a JPEG may contain artifacts due to compression that would not be present in the original raw image, and conversion to WebP may try to retain those artifacts. But it is such conversions matter for our use of WebP (this consideration does not apply to PNG and GIF conversions, because they are lossless).</p></li><li><p>We’re not just interested in whether WebP conversion can shrink images found on the web. We want to know how much WebP allows Polish to reduce the size further than it already does, thus providing a real end-user benefit. So our survey also includes the results of Polish without WebP.</p></li><li><p>In some cases, converting to WebP does not produce a result smaller than the optimized image in the original format. In such cases, we discard the WebP image. So the figures presented below do not penalize WebP for such cases.</p></li></ul><p>Here is a chart showing the results of Polish, with and without WebP conversion. For each format, the average original image size is normalized to 100%, and the average sizes after Polishing are shown relative to that.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5YazeQmjUBmLEir39hYrUh/bab2f4768bf57f5a1f8aecd3f07d9d9a/webp-chart.png" />
            
            </figure><p>Here are the average savings corresponding to the chart:</p><table><tr><td><p><b>Original Format</b></p></td><td><p><b>Polish without WebP</b></p></td><td><p><b>Polish using WebP</b></p></td></tr><tr><td><p>JPEG (with Polish lossless mode)</p></td><td><p>9%</p></td><td><p>19%</p></td></tr><tr><td><p>JPEG (with Polish lossy mode)</p></td><td><p>34%</p></td><td><p>47%</p></td></tr><tr><td><p>PNG</p></td><td><p>16%</p></td><td><p>38%</p></td></tr><tr><td><p>GIF</p></td><td><p>3%</p></td><td><p>16%</p></td></tr></table><p>(The saving is calculated as 100% - (polished size) / (original size).)</p><p>As you can see, WebP conversion achieves significant size improvements not only for JPEG images, but also for PNG and GIF images. We believe supporting WebP will result in lower bandwidth and faster website delivery.</p>
    <div>
      <h3>… and a WebP New Year</h3>
      <a href="#and-a-webp-new-year">
        
      </a>
    </div>
    <p>WebP does not yet have the same level of browser support as JPEG, PNG and GIF, but we are excited about its potential to streamline web pages. Polish WebP conversion allows our customers to adopt WebP with a simple change to the settings in the Cloudflare dashboard. So, if you are on one of our <a href="https://www.cloudflare.com/plans/">paid plans</a>, we encourage you to try it out today.</p><p>PS — Want to help optimize the web? We’re <a href="https://www.cloudflare.com/join-our-team/">hiring</a>.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Polish]]></category>
            <category><![CDATA[Compression]]></category>
            <category><![CDATA[Optimization]]></category>
            <category><![CDATA[WebP]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">7M6kU8b93kMUiHWhgQTkjv</guid>
            <dc:creator>David Wragg</dc:creator>
        </item>
    </channel>
</rss>