◉RORK LABJP
●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens
Articles/Dev Tools
⬡ Dev Tools/2026-07-15Advanced

Half the Bytes, the Same Wait: What AVIF Actually Cost My Wallpaper Apps

Switching to AVIF cut my transfer bill in half and did nothing for perceived speed. Here is the transfer-versus-decode breakdown, the Accept-negotiation trade-off, per-device fallback tiers, and the staged migration order that finally worked across six apps.

Rork622Expo240image formatsAVIFCDN3

✦ Premium Article

The R2 bill said AVIF would halve my costs

I run six wallpaper apps as an indie developer. The images do not ship inside the binary — they come from Cloudflare R2 on demand. One month the transfer line item came in higher than I had planned for, and nine tenths of it was thumbnails and full-size images.

AVIF halves your bytes at the same visual quality. That claim is everywhere, and in my case it held up. I re-encoded 400 wallpapers at 2,796×1,290 from JPEG quality 82 to AVIF quality 50, and 1.41 GB became 0.68 GB. A 52% reduction.

Then I shipped it to real devices and scrolled the gallery. Nothing felt faster. On a Pixel 4a it felt distinctly worse.

I had been staring at a single number — bytes transferred — and assuming that shrinking it would shrink the wait. It does not, and the reason turned out to be worth writing down.

Perceived speed is transfer plus decode

An image reaches the screen through at least three stages: pulling it over the network, unpacking the compression into a bitmap, and drawing it. Change the format and the first stage shrinks while the second one grows.

onLoadStart and onLoad from expo-image collapse all three into one number, so I had to split them apart. Transfer time comes from R2 logs; decode time is the gap between the bytes arriving and the bitmap being ready on device.

Here are the medians from 20 representative images, three runs each, over Wi-Fi measured at 92 Mbps.

FormatAvg sizeTransferDecodeTotal
JPEG q823.6 MB312 ms48 ms360 ms
WebP q802.4 MB208 ms71 ms279 ms
AVIF q501.7 MB147 ms194 ms341 ms

AVIF saved 165 ms on the wire and handed back 146 ms at the decoder. Net gain: 19 ms. My bill dropped by half; my readers waited exactly as long as before.

The faster the connection, the worse this trade looks. Repeating the measurement throttled to 14 Mbps flipped it — AVIF totalled 1,340 ms against JPEG's 2,105 ms, a clear win. Format rankings invert depending on the device and the network. Pick one based on a single average and you are quietly taxing one half of your audience to pay for the other.

On older hardware, decode hurts twice

The Pixel 4a decoded AVIF in roughly 380 ms per image, about 1.9× the 194 ms I measured on an iPhone 15 Pro. Hardware without an AVIF decoder falls back to the CPU.

During a scroll, several images decode at once, so a slow decoder does not just delay one tile — it drags the UI thread with it. Frame drops on the Pixel 4a went from 3.1% to 11.7% after the AVIF rollout. I had made the experience worse in exchange for a cheaper invoice.

The memory side does not improve either. A decoded bitmap is the same size regardless of the source format, which is the same wall I described in the wallpaper cache memory bloat notes. Changing formats reclaims zero bytes of RAM.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Why a 52% drop in transfer bytes produced only a 19ms improvement, shown with the transfer and decode times measured separately
✦Accept negotiation versus a manifest with per-format URLs, compared on CDN hit rate, rollback cost, and what each can express
✦Device-tier fallback logic and the 5-step migration order that cut transfer 38% without regressing frame drops on older hardware
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-11-19
New Wallpapers Showed Up Everywhere Except the Filters: Ship the Count and the Category Lists Together
I added 67 wallpapers in one batch. They appeared in the full list and in New, but not under a single category filter, because I had raised the ID limit and forgotten to ship the category lists. Here is a pre-bump check, a client-side way to spot silent fallbacks in an Expo app, and a post-release count against the origin.
⬡ Dev Tools2026-10-30
It runs in development but the iOS Release build dies on launch — checking whether a missing scheme is the cause
In an expo-router app, an app.json with no scheme can crash only the iOS Release build at launch. A triage table for Release-only crashes, how to read the reason from the log, why Debug and Android survive, the two fixes and why one needs a native rebuild, and a pre-submission check.
⬡ Dev Tools2026-10-27
Claude Sonnet 4.5 Leaves the API on November 30. Find the Model IDs Hard-Coded in Your App First
Claude Sonnet 4.5 leaves the API on November 30, 2026, and the date-less alias claude-sonnet-4-5 goes with it. A revised audit script for the model IDs left in your app, server functions, and config, a triage table for what breaks the next morning, and a comparison of where the model name should live.