Launch offer: everything is 100% off. Download any skill free, no sign-up. Get the skills
TechFixError fixesBill spiked
Bill spiked

Vercel bill spike from image optimization or functions

What you'll see
Spend Management notifications at 50%, 75% and 100% of your amount

# and, if you turned on pausing, visitors get:
503: DEPLOYMENT_PAUSED
Short answer

Find the metric that jumped on the Usage page, turn on Spend Management with pausing so it can't run away, then narrow which images can be optimized and rate limit the routes bots are hitting.

Why it happens

Image Optimization is billed per transformation (each cache miss or stale revalidation) plus cache reads and writes. Every extra width, format and quality multiplies the variants. Next.js warns that loose remotePatterns (for example leaving out the path, which implies a ** wildcard) may let other people optimize images you never intended.

Functions cost active CPU time and memory time. Bots crawling dynamic pages, routes with no caching, and functions that run until the timeout add up fast.

Fix it by hand

  1. Find the metric. In the dashboard open Usage, switch to the last 30 days, and break it down by project. Note whether Image Optimization, Functions or data transfer jumped.
  2. Set a ceiling. On Pro, go to Settings, Billing, Spend Management. Set the On-Demand Budget and enable Pause Production Deployments. Setting an amount alone doesn't stop usage, and Vercel checks every few minutes, so set it a little below your real maximum.
  3. Tighten images. Restrict remotePatterns to your exact host and path:
    images: {
      remotePatterns: [new URL('https://cdn.example.com/my-account/**')],
      formats: ['image/webp'],
      qualities: [75],
      minimumCacheTTL: 2678400, // 31 days, for images that rarely change
    }
    Trim deviceSizes and imageSizes to the widths you use, and mark tiny icons unoptimized per image.
  4. Rate limit expensive routes. In Firewall, add a rule with the Rate Limit action for your API or search routes. WAF rate limiting is available on all plans.
  5. Cap function time. Set a sensible maxDuration per route, cache responses that don't change per user, and look for functions that call themselves.

Stop it happening again

Let TechFix do this for you

Bill Spiked $7

Bill Spiked finds image-optimizer wildcards, uncapped function durations, open endpoints and self-triggering calls in your code, and gives the Vercel spend checklist along with the other paid providers it detects.

  • Finds the uncapped calls, loops and open endpoints that run up a bill, ranked by how much damage each can do.
  • Adds the limits as diffs you approve, and gives a spending-cap checklist for each paid provider in your code.
  • Verdict first. Every finding shows the file and line, what it breaks, and the fix as a diff that is applied only with your OK.

Bill Spiked: how it works, with examples · Install guide

Works with Claude Code, Claude.ai, Cursor, Codex and other agents that read SKILL.md files. No installs, no accounts, works offline. No-questions refund.

Sources (checked 2026-10-13)