<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: smallPict</title>
    <description>The latest articles on DEV Community by smallPict (@smallpict).</description>
    <link>https://dev.to/smallpict</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4167554%2Febbc3295-cb10-4033-8294-a4c8e5ef9ea3.jpeg</url>
      <title>DEV Community: smallPict</title>
      <link>https://dev.to/smallpict</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/smallpict"/>
    <language>en</language>
    <item>
      <title>Why Modern WordPress Sites Need Dual AVIF/WebP (And How to Cut Image Payloads by 80%)</title>
      <dc:creator>smallPict</dc:creator>
      <pubDate>Wed, 07 Oct 2026 04:43:49 +0000</pubDate>
      <link>https://dev.to/smallpict/why-modern-wordpress-sites-need-dual-avifwebp-and-how-to-cut-image-payloads-by-80-2di4</link>
      <guid>https://dev.to/smallpict/why-modern-wordpress-sites-need-dual-avifwebp-and-how-to-cut-image-payloads-by-80-2di4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://smallpict.app/en/blog/why-wordpress-needs-dual-avif-webp" rel="noopener noreferrer"&gt;SmallPict Engineering Blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Images account for over &lt;strong&gt;60% of total web page weight&lt;/strong&gt; on the average WordPress site. On WooCommerce stores and media-heavy blogs, that number easily climbs past 80%.&lt;/p&gt;

&lt;p&gt;When a mobile visitor opens your website over a cellular connection, downloading multi-megabyte JPEG or PNG hero banners is the single biggest culprit behind failing &lt;strong&gt;Google Core Web Vitals (Largest Contentful Paint - LCP)&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Every additional second of load time directly drops conversion rates, inflates bounce rates, and hurts Google search rankings.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Format Dilemma: JPEG vs WebP vs AVIF
&lt;/h2&gt;

&lt;p&gt;For years, WebP was celebrated as the successor to legacy JPEG and PNG formats, cutting file sizes by roughly 25% to 35%. &lt;/p&gt;

&lt;p&gt;However, &lt;strong&gt;AVIF (AV1 Image File Format)&lt;/strong&gt; represents a much bigger generational leap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Up to 50% smaller than WebP&lt;/strong&gt; at equivalent visual quality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Up to 80–85% smaller than original JPEGs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Exceptional preservation of fine gradients, text sharpness, and high-contrast boundaries.&lt;/li&gt;
&lt;li&gt;Native support for 10-bit and 12-bit High Dynamic Range (HDR) color profiles.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Image Format&lt;/th&gt;
&lt;th&gt;Average Compression Ratio&lt;/th&gt;
&lt;th&gt;Browser Support (2026)&lt;/th&gt;
&lt;th&gt;Visual Fidelity&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Legacy JPEG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Baseline (100%)&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;Degrades with high artifacts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Google WebP&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~65% of JPEG&lt;/td&gt;
&lt;td&gt;~97%&lt;/td&gt;
&lt;td&gt;High, slight blur on fine lines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Modern AVIF&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~18–25% of JPEG&lt;/td&gt;
&lt;td&gt;~94%&lt;/td&gt;
&lt;td&gt;Exceptional sharpness &amp;amp; color&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Trap: Why Single-Format Delivery Breaks Browsers
&lt;/h2&gt;

&lt;p&gt;If AVIF is so superior, why doesn't every WordPress site switch all images to AVIF?&lt;/p&gt;

&lt;p&gt;The trap lies in &lt;strong&gt;legacy browser compatibility&lt;/strong&gt;. While modern Chrome, Safari (v16.1+), and Firefox support AVIF natively, older mobile devices, embedded webviews, in-app social browsers (Instagram/Facebook/X in-app webviews), and legacy operating systems still cannot decode AVIF files.&lt;/p&gt;

&lt;p&gt;If a plugin simply replaces &lt;code&gt;.jpg&lt;/code&gt; file extensions with &lt;code&gt;.avif&lt;/code&gt;, users on older devices or in-app webviews will see broken placeholder boxes or missing images.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: HTML5 Dual Picture Tag Delivery
&lt;/h3&gt;

&lt;p&gt;The standard-compliant, future-proof solution is &lt;strong&gt;Dual Format Delivery&lt;/strong&gt; using native HTML5 &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; tags with progressive source fallback:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;picture&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- 1. Modern browsers download ultra-lightweight AVIF --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/avif"&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"hero.avif"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- 2. Compatible browsers fallback to WebP --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/webp"&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"hero.webp"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- 3. Legacy clients safely render original JPEG --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"hero.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Optimized Hero Image"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"1200"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"630"&lt;/span&gt; &lt;span class="na"&gt;loading=&lt;/span&gt;&lt;span class="s"&gt;"lazy"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/picture&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this markup:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Modern devices download the razor-sharp 45KB AVIF asset.&lt;/li&gt;
&lt;li&gt;Intermediate browsers download the 95KB WebP asset.&lt;/li&gt;
&lt;li&gt;Older devices gracefully fall back to the original JPEG.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of this happens natively in the browser's preload scanner without layout shifts (CLS) or JavaScript overhead.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Cloud Quota Waste Problem (And How We Solved It)
&lt;/h2&gt;

&lt;p&gt;Most WordPress image optimizer plugins suffer from a fundamental architectural flaw: &lt;strong&gt;they upload and convert every single thumbnail size to the cloud&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When you upload a single image to WordPress, the core system automatically generates 6 to 12 intermediate sub-sizes (e.g., &lt;code&gt;thumbnail&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;large&lt;/code&gt;, &lt;code&gt;woocommerce_catalog&lt;/code&gt;, &lt;code&gt;woocommerce_single&lt;/code&gt;, etc.). &lt;/p&gt;

&lt;p&gt;If a plugin sends all 12 sub-sizes to an external cloud API for AVIF and WebP transcoding, a single photo upload consumes &lt;strong&gt;24 cloud conversion credits&lt;/strong&gt;! Your monthly plan quota evaporates in days.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Zero-Cloud Local Sub-Size Generation Strategy
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F72po5jzhnxo4bknsdc5q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F72po5jzhnxo4bknsdc5q.png" alt="Architecture Comparison: Traditional vs SmallPict Cloud Quota Strategy" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To solve this, we architected an upfront dispatch calculator in &lt;a href="https://smallpict.app" rel="noopener noreferrer"&gt;SmallPict&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Only the Master Image is Dispatched&lt;/strong&gt;: SmallPict sends only the original high-resolution master asset to our cloud API for lossless/lossy next-gen conversion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Generation via &lt;code&gt;WP_Image_Editor&lt;/code&gt;&lt;/strong&gt;: Once the optimized master &lt;code&gt;.avif&lt;/code&gt; and &lt;code&gt;.webp&lt;/code&gt; files return to your server, SmallPict reuses WordPress's native local image processor (&lt;code&gt;WP_Image_Editor&lt;/code&gt; / GD or Imagick) to generate all intermediate thumbnail sub-sizes &lt;strong&gt;directly on your local server for free&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Quota Waste&lt;/strong&gt;: A photo with 12 thumbnails consumes only &lt;strong&gt;1 cloud credit&lt;/strong&gt;, saving you up to 90% in cloud processing fees.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Real-World Benchmark Results
&lt;/h2&gt;

&lt;p&gt;We benchmarked a standard WooCommerce single product page featuring 8 high-resolution product photos before and after implementing this Dual AVIF pipeline on a simulated 4G mobile connection:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmjmx5mkdc0pmcl8aib04.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmjmx5mkdc0pmcl8aib04.png" alt="WooCommerce Mobile 4G Benchmark Comparison: 41 vs 96 PageSpeed" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Original Image Payload&lt;/strong&gt;: 4.62 MB (JPEGs)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SmallPict Optimized Payload&lt;/strong&gt;: 684 KB (AVIF with WebP fallback)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Total Weight Reduction&lt;/strong&gt;: &lt;strong&gt;-85.2%&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile Largest Contentful Paint (LCP)&lt;/strong&gt;: Dropped from &lt;strong&gt;4.3 seconds to 1.1 seconds&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google PageSpeed Mobile Score&lt;/strong&gt;: Jumped from &lt;strong&gt;41 to 96 (Green)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary &amp;amp; Next Steps
&lt;/h2&gt;

&lt;p&gt;Delivering next-generation image formats shouldn't require trading off browser compatibility or burning through expensive cloud quotas. By pairing cloud-grade AVIF encoding with HTML5 &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; fallbacks and local thumbnail generation, WordPress sites can achieve sub-second LCP scores on mobile networks.&lt;/p&gt;

&lt;p&gt;If you are running a WordPress or WooCommerce site and want to test this pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can explore the &lt;a href="https://smallpict.app" rel="noopener noreferrer"&gt;SmallPict WordPress Plugin&lt;/a&gt; (free tier includes 100 images/month).&lt;/li&gt;
&lt;li&gt;Read the full technical documentation and benchmarks on our &lt;a href="https://smallpict.app/en/blog" rel="noopener noreferrer"&gt;Engineering Blog&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you experimented with AVIF in production yet? What's your current strategy for handling legacy fallbacks? Let's discuss in the comments below!&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>webperf</category>
      <category>performance</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
