<?xml version="1.0" encoding="UTF-8"?><rss 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" version="2.0"><channel><title><![CDATA[Level UI]]></title><description><![CDATA[We’re a single team covering the full digital stack — from brand and interface design to web, app and platform development, e-commerce, marketing and AI automat]]></description><link>https://levelui.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ab7ddb14c6234f862c60a96/a1fcdb4c-7001-4c11-8432-aefc79327db3.png</url><title>Level UI</title><link>https://levelui.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 01 Nov 2026 17:14:28 GMT</lastBuildDate><atom:link href="https://levelui.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Flutter vs React Native in 2026: one draws every pixel, the other borrows them]]></title><description><![CDATA[Flutter draws its own UI, React Native drives the platform's. What that means for look, performance, staffing, the web and upgrades, and a simple rule for…]]></description><link>https://levelui.hashnode.dev/flutter-vs-react-native</link><guid isPermaLink="true">https://levelui.hashnode.dev/flutter-vs-react-native</guid><category><![CDATA[Flutter]]></category><category><![CDATA[React Native]]></category><category><![CDATA[Mobile Development]]></category><category><![CDATA[Dart]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Level UI]]></dc:creator><pubDate>Fri, 30 Oct 2026 21:20:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ab7ddb14c6234f862c60a96/379d6e94-fbc1-4fae-8a71-e676bf8fb4d2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most "Flutter vs React Native" posts end in a benchmark. This one does not, because for the apps most teams are asked to build, the benchmark is not what decides it. The two frameworks get to the same place, one codebase for iPhone and Android, in opposite ways, and that one architectural choice explains nearly every difference you will run into later: how the app looks, who can maintain it, how much of it you can share with a website, and how it ages.</p>
<p>We build cross-platform apps in Flutter, so we are not neutral, and we say below when React Native is the better pick anyway.</p>
<h2>TL;DR</h2>
<ul>
<li><strong>Rendering:</strong> Flutter paints every pixel with its own engine; React Native drives the real iOS and Android UI components from JavaScript.</li>
<li><strong>Look:</strong> Flutter looks <strong>the same everywhere</strong>; React Native looks <strong>native everywhere</strong>.</li>
<li><strong>Staffing:</strong> in Stack Overflow's 2024 survey, 62.3% of respondents used JavaScript and 38.5% TypeScript, against <strong>6% for Dart</strong>.</li>
<li><strong>Performance:</strong> for typical business apps, users cannot tell. Flutter leads on heavy custom animation, React Native on standard platform screens.</li>
<li><strong>Web:</strong> neither should build your marketing website. React Native's real web advantage is <strong>sharing TypeScript with a React or Next.js site</strong>.</li>
<li><strong>Rule:</strong> React team already? React Native. Starting fresh with a branded, identical-on-both-phones design? Flutter.</li>
</ul>
<h2>Where they stand in October 2026</h2>
<table>
<thead>
<tr>
<th></th>
<th>Flutter</th>
<th>React Native</th>
</tr>
</thead>
<tbody><tr>
<td>Made by</td>
<td>Google</td>
<td>Meta; owned by the React Foundation since February 2026</td>
</tr>
<tr>
<td>Language</td>
<td>Dart</td>
<td>JavaScript or TypeScript</td>
</tr>
<tr>
<td>Screen drawn by</td>
<td>Its own engine, Impeller</td>
<td>The platform's own UI components</td>
</tr>
<tr>
<td>Latest version</td>
<td>3.47 (August 2026)</td>
<td>0.87 (August 2026)</td>
</tr>
<tr>
<td>Release rhythm</td>
<td>Stable release every three months</td>
<td>New version every two months</td>
</tr>
<tr>
<td>Recommended start</td>
<td>The Flutter SDK and its tools</td>
<td>Expo, as the React Native docs advise</td>
</tr>
</tbody></table>
<h2>One draws the pixels, the other borrows them</h2>
<p>Flutter brings its own drawing engine. Dart is compiled ahead of time to machine code, and Impeller, the default renderer on iOS and on Android 10 and newer since Flutter 3.27, paints every button, text run and animation itself through the GPU. Impeller precompiles its shaders when the engine is built, which is what removed the first-run animation stutter older Flutter apps were known for.</p>
<p>React Native does the opposite. Your JavaScript runs in Hermes, the engine Meta built for phones, and tells iOS and Android which of their own components to show. Since 0.82 it runs only on the New Architecture, where JavaScript calls native code directly instead of serialising messages over the old bridge, and since 0.84 a new version of Hermes is the default engine.</p>
<p>The same button makes the difference concrete. In Flutter:</p>
<pre><code class="language-dart">ElevatedButton(
  onPressed: checkout,
  child: const Text('Pay now'),
)
</code></pre>
<p>That is a Flutter widget, drawn by Flutter. It is pixel for pixel identical on both phones, and it only looks like an iOS button if someone designs it to. In React Native:</p>
<pre><code class="language-tsx">import { Button } from 'react-native'

&lt;Button title="Pay now" onPress={checkout} /&gt;
</code></pre>
<p>That renders the platform's own button: a UIKit button on iOS, an Android button on Android. It picks up each system's look, text handling and accessibility behaviour for free, and it changes when Apple or Google change theirs.</p>
<p><strong>Neither is better in general: a bank or a shop with a strong brand usually wants the first, a utility that should feel like part of the phone usually wants the second.</strong> That is the question to answer before any benchmark.</p>
<h2>The language is a staffing decision</h2>
<p>Dart is a pleasant language, and anyone who knows TypeScript, Kotlin or Swift picks it up quickly. The issue is the pool. A React Native app can be maintained by any React developer, and the Stack Overflow numbers above show how many more of those there are. Outside Flutter, Dart is rarely used, so a Flutter app needs people who chose Flutter.</p>
<p>The bigger practical gain on the React Native side is sharing code with a website. If the product already has a React or Next.js frontend, the data models, validation and API client can live in one TypeScript package used by both:</p>
<pre><code class="language-ts">// packages/shared/order.ts — imported by the Next.js site and the React Native app
export type OrderLine = { sku: string; qty: number }

export function orderTotal(lines: OrderLine[], prices: Record&lt;string, number&gt;) {
  return lines.reduce((sum, l) =&gt; sum + (prices[l.sku] ?? 0) * l.qty, 0)
}
</code></pre>
<p>A Flutter app next to a React website is two codebases in two languages, and that logic gets written twice. For a team that owns both, this often decides it on its own.</p>
<h2>Performance: mostly a wash, with two edges</h2>
<p>For lists, forms, a map, payments and push notifications, both are fast enough that users cannot tell which was used. The edges are real but narrow. Flutter has the advantage with heavy custom animation and complex drawn interfaces, because it owns every frame. React Native has the advantage when the app is mostly standard platform screens, long native lists and system components, because those are the platform's own code.</p>
<p>Be careful with the benchmarks you find. Most compare a small demo built by one person who knows one of the two frameworks much better than the other, and both frameworks replaced their rendering path in the last two years, so anything older than that measures software that no longer ships. What makes real apps slow is usually the same in both: work on the main thread, images far larger than the screen, and too many requests to a slow API.</p>
<h2>The web is where they differ most</h2>
<p>Both can run in a browser: Flutter directly, React Native through React Native for Web, which Expo sets up for you. Neither is how you should build the pages people find on Google. Flutter's own documentation says it is not suitable for static, text-rich websites and that its output does not match what search engines need to index it properly; its advice is to build landing pages, marketing and help content in normal HTML and keep Flutter for the app.</p>
<p>That is our advice for both frameworks. The website is a website, ideally a fast static one. The app is what people use once they are customers.</p>
<h2>When a native feature is the whole point</h2>
<p>Building natively means two apps, Swift and SwiftUI for iPhone and Kotlin for Android, at roughly twice the build and maintenance cost. It is worth it when the app lives on platform features: home-screen and lock-screen widgets, Apple Watch or Wear OS, CarPlay, augmented reality, heavy background work such as tracking or Bluetooth devices, or when you only need one platform.</p>
<p>For everything else, neither framework locks the platform out. You write the one native piece per platform and call it from the shared code. In Flutter that is a platform channel:</p>
<pre><code class="language-dart">const channel = MethodChannel('app/battery');

final level = await channel.invokeMethod&lt;int&gt;('getBatteryLevel');
</code></pre>
<p>with a small Swift and Kotlin handler on the other end. React Native's New Architecture does the same through native modules. Either way, the piece written twice is one feature, not the whole app.</p>
<h2>Plan for upgrades from day one</h2>
<p>Flutter ships a stable release about every three months: 3.38 in November 2025, then 3.41, 3.44 and 3.47 through 2026. React Native ships roughly every two months, 0.84 to 0.87 between February and August 2026, and since February it belongs to the React Foundation under the Linux Foundation, with Meta, Microsoft, Amazon, Expo, Callstack, Software Mansion, Vercel and Huawei among its founding members. Neither is going anywhere.</p>
<p>That pace is the real maintenance cost. Apple and Google raise the minimum SDK versions they accept every year, and the framework, its plugins and the build tools have to move with them. <strong>An app nobody updates for a year eventually cannot ship an update at all.</strong> A small upgrade every few months is routine. A jump across two years of versions is a project, so it belongs in the budget from the start.</p>
<h2>How we choose</h2>
<p><strong>If the team already writes React, choose React Native; if you are starting fresh and the design should be identical on both phones, choose Flutter.</strong> Then check the exceptions: an app that should look exactly like the system leans to React Native, rich custom animation leans to Flutter, widgets, wearables or hardware lean to native. If none of them applies, the deciding question is who will maintain the app in three years.</p>
<p>When a project calls for one codebase, we build it in Flutter, because the apps we are asked for are usually branded products that should look the same everywhere, and because the same Figma design goes to both stores without platform differences. When a client already has a React team, React Native is the better choice, and we tell them so.</p>
<hr />
<p><em>Originally published on</em> <a href="https://levelui.com/resources/flutter-vs-react-native"><em>levelui.com</em></a><em>, with who uses each framework in production, the full source list and answers to the questions clients ask: whether Google is abandoning Flutter, who owns React Native now, and when to build natively. Also available in</em> <a href="https://levelui.de/resources/flutter-vs-react-native"><em>German</em></a> <em>and</em> <a href="https://levelui.ro/resources/flutter-vs-react-native"><em>Romanian</em></a><em>.</em></p>
<p><em>This copy is a snapshot from the day it was posted, and it will not be updated here. The original on</em> <a href="http://levelui.com"><em>levelui.com</em></a> <em>is the version we keep current: when a framework ships a new version, a figure changes or a tool is renamed, that is where the correction lands. If you want the up-to-date version, follow the link above.</em></p>
<p><em>We are</em> <a href="https://levelui.com"><em>Level UI</em></a><em>, a web design and development agency in Bucharest.</em></p>
]]></content:encoded></item><item><title><![CDATA[WebP vs AVIF vs JPEG: we measured all three on 12 web images]]></title><description><![CDATA[AVIF vs WebP vs JPEG, 12 web images at equal quality: AVIF was a median 20% smaller than WebP, but lost on grainy images and took 7.6× longer to encode.]]></description><link>https://levelui.hashnode.dev/webp-vs-avif</link><guid isPermaLink="true">https://levelui.hashnode.dev/webp-vs-avif</guid><category><![CDATA[web performance]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Next.js]]></category><category><![CDATA[images]]></category><category><![CDATA[Frontend Development]]></category><dc:creator><![CDATA[Level UI]]></dc:creator><pubDate>Tue, 27 Oct 2026 18:27:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ab7ddb14c6234f862c60a96/d50be4df-2be3-4e3c-b495-4bea751e9e13.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every article on WebP vs AVIF says AVIF is smaller. Ours does too, mostly.</p>
<p>We encoded 12 typical web images, from photorealistic scenes to 3D renders to page screenshots, as JPEG, WebP and AVIF, matched them to the same visual quality and measured the bytes, the encode time and the decode time in Chrome. AVIF came out a median 20% smaller than WebP, and JPEG needed a median 37% more bytes than WebP. But on the three grainiest images AVIF needed more bytes than WebP, at the settings most tools use it took 7.6 times as long to encode, and on our own server that cost is why our site still serves WebP.</p>
<h2>TL;DR</h2>
<ul>
<li><strong>Size:</strong> at the quality of WebP q85, AVIF was a median <strong>20% smaller</strong> than WebP; JPEG was a median <strong>37% larger</strong>.</li>
<li><strong>Grain:</strong> on the three noisiest images, AVIF was <strong>17–22% larger</strong> than WebP.</li>
<li><strong>Encode:</strong> AVIF took a median <strong>7.6×</strong> as long as WebP with sharp's defaults (1.8× at the effort Next.js uses).</li>
<li><strong>Decode:</strong> practically a tie, AVIF a median 3% slower in Chrome.</li>
<li><strong>Rule:</strong> AVIF where images are encoded once, ahead of time; WebP where a server encodes them on demand.</li>
</ul>
<h2>The three formats in one paragraph</h2>
<p>JPEG is the format every browser and every tool has read for decades. WebP is Google's format, built on the VP8 video codec. AVIF is the image format of AV1, the video codec of the Alliance for Open Media. All three compress photos with loss; WebP and AVIF can also do lossless images, transparency and animation. The question for a website is which one gives the smallest file at the quality you would publish, what it costs to make, and whether every visitor can see it.</p>
<h2>How we measured</h2>
<p>We picked 12 images of the kinds that end up on business websites: two photorealistic scenes, one clinic website with a portrait photo, six 3D renders from our own article art and three screenshots of pages on our site. Every source was a lossless PNG resized to 1,600 px wide. We encoded each one with <a href="https://sharp.pixelplumbing.com/api-output/">sharp</a>, the image library behind Next.js and many other tools, as JPEG (mozjpeg) at eight quality settings from 50 to 95, WebP at the same eight, and AVIF at eleven from 30 to 80, with sharp's defaults otherwise.</p>
<p>To compare at equal quality we measured <a href="https://www.cns.nyu.edu/pub/eero/wang03-reprint.pdf">SSIM</a>, a standard similarity score, between each file and its source, and for each image took the score WebP reached at quality 85, the setting our site uses. We then read off how many bytes JPEG and AVIF needed to reach the same score.</p>
<p>Encode times are wall-clock on an Intel Core i7-6700K. Decode times were measured in Chrome 142 with <code>createImageBitmap</code>, 12 rounds per file in rotating order after a warm-up round. None of our sources is a straight-from-camera photo; the photorealistic scenes are renders, which is why the image types are reported separately.</p>
<h2>The results</h2>
<p>File size of each image at the quality of WebP q85:</p>
<table>
<thead>
<tr>
<th>Image</th>
<th>Type</th>
<th>Lossless PNG</th>
<th>JPEG</th>
<th>WebP q85</th>
<th>AVIF</th>
<th>AVIF vs WebP</th>
</tr>
</thead>
<tbody><tr>
<td>Desk with laptop</td>
<td>Photorealistic</td>
<td>1,341 KB</td>
<td>102 KB (q82)</td>
<td>75 KB</td>
<td>50 KB (q60)</td>
<td>−33%</td>
</tr>
<tr>
<td>Crowd under lights</td>
<td>Photorealistic</td>
<td>2,981 KB</td>
<td>336 KB (q88)</td>
<td>280 KB</td>
<td>227 KB (q70)</td>
<td>−19%</td>
</tr>
<tr>
<td>Clinic website with photo</td>
<td>Photo and interface</td>
<td>468 KB</td>
<td>52 KB (q89)</td>
<td>30 KB</td>
<td>24 KB (q68)</td>
<td>−20%</td>
</tr>
<tr>
<td>Clay figure, hospital bed</td>
<td>3D render</td>
<td>2,454 KB</td>
<td>77 KB (q77)</td>
<td>56 KB</td>
<td>28 KB (q49)</td>
<td>−51%</td>
</tr>
<tr>
<td>Clay figures, neon stage</td>
<td>3D render</td>
<td>3,433 KB</td>
<td>185 KB (q87)</td>
<td>122 KB</td>
<td>97 KB (q65)</td>
<td>−20%</td>
</tr>
<tr>
<td>Clay figure, office</td>
<td>3D render</td>
<td>3,852 KB</td>
<td>303 KB (q88)</td>
<td>233 KB</td>
<td>188 KB (q69)</td>
<td>−19%</td>
</tr>
<tr>
<td>Clay figure with headphones</td>
<td>3D render, grainy</td>
<td>3,869 KB</td>
<td>not reached</td>
<td>419 KB</td>
<td>491 KB (q75)</td>
<td>+17%</td>
</tr>
<tr>
<td>Robot, dark scene</td>
<td>3D render, grainy</td>
<td>3,504 KB</td>
<td>not reached</td>
<td>391 KB</td>
<td>459 KB (q75)</td>
<td>+17%</td>
</tr>
<tr>
<td>Living room</td>
<td>3D render, grainy</td>
<td>4,109 KB</td>
<td>not reached</td>
<td>472 KB</td>
<td>576 KB (q77)</td>
<td>+22%</td>
</tr>
<tr>
<td>Homepage</td>
<td>Screenshot</td>
<td>47 KB</td>
<td>not reached</td>
<td>22 KB</td>
<td>15 KB (q58)</td>
<td>−31%</td>
</tr>
<tr>
<td>Prices page</td>
<td>Screenshot</td>
<td>66 KB</td>
<td>not reached</td>
<td>35 KB</td>
<td>28 KB (q63)</td>
<td>−21%</td>
</tr>
<tr>
<td>Table in a guide</td>
<td>Screenshot</td>
<td>112 KB</td>
<td>not reached</td>
<td>65 KB</td>
<td>45 KB (q45)</td>
<td>−30%</td>
</tr>
</tbody></table>
<p><em>Each image 1,600 px wide, encoded with sharp 0.35.5 (mozjpeg, libwebp 1.6.0, libaom 3.15.1) on 10 October 2026. JPEG and AVIF were interpolated to the SSIM that WebP reached at quality 85, so every row compares files that look equally good by that measure; the q in brackets is the setting that gets there. "Not reached": JPEG stayed below that quality even at q95.</em></p>
<h2>File size at the same quality</h2>
<p><strong>At the quality we serve, AVIF was a median 20% smaller than WebP, and JPEG was a median 37% larger than WebP.</strong> The AVIF advantage was largest on screenshots (a median 30%) and on the simple, clean render of a figure in a hospital bed, which came out at half the size. On the photorealistic scenes it was 19 to 33%. JPEG was the largest file wherever it could reach WebP's quality at all; on the screenshots and the grainy renders it could not, even at quality 95.</p>
<p>At a lower quality the gap widens. Matched to WebP at quality 75, the default of Next.js, AVIF was a median 27% smaller and JPEG a median 56% larger. Compared with the lossless PNG sources, the WebP files were about a twelfth of the size: 2.2 MB against 26 MB for all 12 images together.</p>
<h2>Where AVIF loses: grain and fine noise</h2>
<p>On three images AVIF needed more bytes than WebP, not fewer: 17% more on two of them and 22% more on the third. All three are renders with visible film grain, and they are the three noisiest images in the set by a simple measure of pixel-to-pixel detail, between 24 and 28 against 2 to 16 for the other nine. AVIF tends to smooth that kind of fine noise away, and keeping it costs bits.</p>
<p>Because those three are also among the largest files, the 12 AVIF files together came out 1% larger than the 12 WebP files; without them, AVIF saved 24% in total.</p>
<p>So if your images are grainy photos or renders with deliberate texture, test them before switching. If they are clean product shots, illustrations or screenshots, AVIF will almost certainly be smaller.</p>
<h2>Encoding: where AVIF's cost is paid</h2>
<p>With sharp's default settings, AVIF took a median 7.6 times as long to encode as WebP: about a second per image here, against 0.15 seconds for WebP and 0.13 for JPEG. The ratio ranged from 3 to 15 times, and the slowest were the large, detailed images. Next.js encodes AVIF at a lower effort setting, effort 3 instead of sharp's default 4; at effort 3, AVIF took 1.8 times as long as WebP, and the files were a median 4% larger at the same quality setting.</p>
<p><strong>AVIF's cost is paid when the image is encoded, so whether it matters depends on where that happens.</strong> In a build step or a CDN that encodes each image once and caches it, a second per image is nothing. On a server that encodes on the first request, the first visitor waits for it.</p>
<p>We measured that on our own hosting before deciding: a 24-megapixel portfolio image took <strong>40.07 seconds</strong> as AVIF against <strong>2.57 seconds</strong> as WebP through the same Next.js optimiser, to save 17% of the bytes, and it kept one CPU busy the whole time. Our site serves WebP for that reason.</p>
<h2>Decoding in the browser: practically a tie</h2>
<p>Decoding took about the same time for AVIF and WebP: AVIF was a median 3% slower, around 14 milliseconds for a 1,600-pixel image on a desktop, and JPEG was 20% faster than WebP. Slowing the CPU down fourfold in Chrome changed almost nothing, because Chrome decodes images off the main thread.</p>
<p>The download is what counts. At the 1.6 Mbps that <a href="https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md">Lighthouse uses to simulate a mobile connection</a>, the median AVIF file arrived 69 milliseconds sooner than its WebP version, and the smaller photorealistic scene 128 milliseconds sooner. That is the difference that shows up in <a href="https://levelui.com/resources/core-web-vitals-explained">Largest Contentful Paint</a> when the image is the largest element on the page.</p>
<h2>Browser support in 2026</h2>
<p>Both formats are safe for almost every visitor. Can I Use puts global support at <a href="https://caniuse.com/webp">96.74% for WebP</a> and <a href="https://caniuse.com/avif">95.35% for AVIF</a>. AVIF has worked in Chrome since version 85, Firefox since 93, Safari on iPhone since iOS 16 and Edge since 121; Safari on the Mac lists it as partial, because it needs macOS Ventura or later and does not support AVIF's noise synthesis.</p>
<p>The few browsers left without either are the reason a fallback still makes sense: a <code>picture</code> element that offers AVIF first, then WebP, then JPEG:</p>
<pre><code class="language-html">&lt;picture&gt;
  &lt;source srcset="/img/hero.avif" type="image/avif"&gt;
  &lt;source srcset="/img/hero.webp" type="image/webp"&gt;
  &lt;img src="/img/hero.jpg" width="1600" height="900" alt="…"&gt;
&lt;/picture&gt;
</code></pre>
<p>Or an image service that picks the format from what the browser says it accepts. In Next.js that is the built-in optimiser, which serves <a href="https://nextjs.org/docs/app/api-reference/components/image">WebP only by default</a>; AVIF is opt-in:</p>
<pre><code class="language-js">// next.config.js
module.exports = {
  images: {
    formats: ['image/avif', 'image/webp'],
  },
}
</code></pre>
<p>Read the encoding section before you add that line if your optimiser runs on the same box as your app.</p>
<h2>Which format to use</h2>
<p><strong>Use AVIF where images are encoded once, ahead of time, and WebP where a server encodes them on demand.</strong> A static site, a build pipeline or an image CDN can afford AVIF's encoding time and gets files a fifth smaller for it, with WebP as the fallback. A self-hosted optimiser on modest hardware, like ours, is better off with WebP, which is already about a quarter smaller than JPEG. Keep JPEG as the last fallback only.</p>
<p>Whatever you choose, it matters less than serving images at the right size: a 1,600-pixel image where 800 would do costs more than any format change saves.</p>
<h2>Quality settings that match</h2>
<p>The matches in our test were:</p>
<table>
<thead>
<tr>
<th>WebP</th>
<th>AVIF</th>
<th>JPEG</th>
</tr>
</thead>
<tbody><tr>
<td>85</td>
<td>67</td>
<td>87</td>
</tr>
<tr>
<td>75</td>
<td>50</td>
<td>77</td>
</tr>
</tbody></table>
<p>In sharp, that is:</p>
<pre><code class="language-js">import sharp from 'sharp'

await sharp('in.png').resize({ width: 1600 }).webp({ quality: 85 }).toFile('out.webp')
await sharp('in.png').resize({ width: 1600 }).avif({ quality: 67 }).toFile('out.avif')
</code></pre>
<p>Lower AVIF numbers do not mean worse images than the same number in WebP: the scales are different. One trap: Next.js turns its quality setting into an AVIF quality by multiplying it by 0.625, so 85 becomes 53. By our measure that is noticeably below its WebP at 85, so part of the saving you see from switching on AVIF in Next.js is lower quality.</p>
<p>Images and <a href="https://levelui.com/resources/web-fonts-performance">web fonts</a> are the two parts of page weight a designer decides most directly.</p>
<hr />
<p><em>Originally published on</em> <a href="https://levelui.com/resources/webp-vs-avif"><em>levelui.com</em></a><em>, with the full source list. Also available in</em> <a href="https://levelui.de/resources/webp-vs-avif"><em>German</em></a> <em>and</em> <a href="https://levelui.ro/resources/webp-vs-avif"><em>Romanian</em></a><em>.</em></p>
<p><em>We are</em> <a href="https://levelui.com"><em>Level UI</em></a><em>, a web design and development agency in Bucharest.</em></p>
]]></content:encoded></item></channel></rss>