One hero image, requested at four widths in two formats, is eight image transformations on Vercel. A grid of 100 product images, each requested at six widths in two formats, is 1,200. The Hobby plan allows 5K a month.
That multiplication is how a small Next.js site burns through its image budget without anyone noticing. Below is where the count comes from and the next.config.js changes that bring it down.
What gets counted
Hobby includes 5K transformations, 300K cache reads and 100K cache writes per month. A cache hit costs a read. A cache MISS or a STALE revalidation costs a transformation and a write. Transformations are the meter to watch.
A transformation is one unique combination of source image, width, quality and format. Change any of the four and Next.js produces and caches a new file.
Vercel's own guide says three things drive these meters: how many distinct transformations exist, how large the transformed files are, and how long they stay cached. The first one multiplies, so I start there.
Going over doesn't cost money, because Vercel never bills a Hobby team on demand. What happens is that new optimizations return HTTP 402 in place of an image, onError fires, the alt text renders and the layout shifts. In most cases you wait 30 days before it works again.
Step 1: Remove AVIF
images.formats defaults to WebP only. Adding image/avif doubles the transformations and cache entries for every image. AVIF is often smaller than WebP, but on Hobby that saving costs you half your budget. I leave it off on free-plan projects and keep it for Pro projects where bandwidth matters more.
// next.config.js module.exports = { images: { formats: ['image/webp'], }, } Step 2: Add sizes to every fill image
Without sizes, the browser can't tell how wide the image will render, so Next.js falls back to broad defaults. With fill and no sizes, expect the worst-case list of widths. Tell it:
<Image src={product.image} alt={product.name} fill sizes="(min-width: 1024px) 33vw, 100vw" /> That card is about a third of the viewport on desktop and full width on mobile. The browser now asks for a sensible width, and you stop generating a 1920px version of a 400px thumbnail. Search your codebase for fill before you change anything else.
Step 3: Trim widths and pin quality
The default deviceSizes are 640, 750, 828, 1080, 1200, 1920, 2048 and 3840, plus a list of smaller imageSizes for fixed-width images. Real traffic spreads across many of them, and each width requested for an image is a new transformation. For a blog or marketing site, this is enough:
images: { formats: ['image/webp'], deviceSizes: [640, 828, 1200, 1920], imageSizes: [64, 128, 256], qualities: [75], minimumCacheTTL: 2678400, // 31 days, in seconds } Browsers pick the next size up, so a 1000px viewport downloads the 1200px image. You get a slightly heavier file and fewer variants, which is a good deal on a free plan.
qualities: [75] matters too. If one component passes quality={80}, another 60 and another 90, you've created separate variants of the same image with no visible difference. Pick one value.
Step 4: Raise the cache lifetime
Every STALE revalidation costs a transformation. With a short TTL, images expire and get re-transformed though nothing changed. A project where cache writes run at or above reads is a warning sign: you're creating transformations nobody reuses. The config above sets minimumCacheTTL to 31 days.
The catch is that a long TTL only works if the URL changes when the image changes. Overwrite hero.jpg in place and expect an update, and it won't come. Version the filename or purge the cache after a swap. For a blog or portfolio, where images rarely change, a long TTL is nearly free.
Step 5: Check your remote URLs
Images from a CMS or storage bucket are where I'd look first when the numbers don't add up. The cache key for remote images is built from the URL, so a query string that changes on each request gives you a new cache entry for the same picture. Open the network tab and compare the src values between page loads. Short-lived signed URLs are the usual cause.
When Vercel's optimizer is the wrong tool
A gallery, a big store catalog or user uploads can still overwhelm 5K after all this tuning. For a fixed set of images, I optimize before deploy: run sharp at build time and serve the output with unoptimized. For user uploads I'd move to a dedicated image service with a custom loader. I laid out both routes, including what you give up with each, in my full guide on avoiding the Vercel free plan image limit.
Takeaways
Check Vercel's Observability view for image optimization after each change. You want the transformation count down and cache reads growing relative to cache writes. Give it a few days after you deploy.
My order when I'm already at the limit: remove AVIF, add sizes to every fill image, trim deviceSizes, raise the TTL, then check remote URLs. I'd expect most projects to land well under 5K after the first three.
Two warnings. Don't set images.unoptimized: true globally: it turns off resizing for everything, and a 4MB camera hero ships at full weight. And if the site earns money, remember Hobby is for non-commercial, personal use only. Pay for Pro.