Skip to content

Fix Next.js image optimization

Ship-ready Next.js, App Router or Pages

  • Senior engineers · IST + EST overlap
  • NDA on day 1
  • 24-hour reply

Tell us what you need fixed

Reply in 24 hours · NDA on day 1 · No spam.

Fix Next.js image optimization — done properly, by senior engineers

We fix Next.js image optimization problems at their source, whether next/image is rejecting an unconfigured host, shipping hero images far larger than their rendered size, or lazy-loading the wrong pictures. The component automates a lot, but only from the information you give it. Remote hosts must match remotePatterns, or development throws and the production optimizer answers 400. A fill image without a sizes value is treated as viewport-wide, so a small card thumbnail downloads a full-width file, and width and height props copied from the original asset produce a srcset built for a much larger slot. Everything lazy-loads by default, so the hero waits unless it is marked for eager, high-priority loading. Upgrades add surprises of their own: Next.js 16 deprecates priority in favor of preload, accepts only quality 75 unless you list more values, and keeps optimized images cached for at least four hours. Krapton’s engineers audit every image call site, measure what each breakpoint actually downloads, and tune remotePatterns, formats, device sizes and loaders to your traffic. You receive corrected components and config, a per-template report of bytes saved, and a clear answer on whether a dedicated image CDN would serve you better than the built-in optimizer.

What you're seeing

`next/image` throws on unconfigured hosts, ships huge LCP images, or fails to lazy-load below the fold.

Our approach

We rebuild the image pipeline — remote patterns, priority flags, sizes attribute, AVIF/WEBP — and cut image weight without visible quality loss.

Symptoms teams come to us with

  • Development throws “hostname is not configured under images” for a CMS or CDN asset domain.
  • Lighthouse’s image delivery insight flags hero images many times larger than their rendered size.
  • The LCP image starts downloading late because it lazy-loads or is discovered only after hydration.
  • Below-the-fold galleries load immediately because priority or eager loading was copied onto every image.
  • Images using fill collapse to zero height or spill out of their container on some breakpoints.

What we check first

  1. Images using fill without a sizes value, so the browser treats each one as full viewport width.
  2. Intrinsic width and height props on responsive images, producing 1x and 2x candidates far above the rendered size.
  3. Asset hosts missing from remotePatterns, or a deprecated images.domains list that no longer matches the CDN.
  4. Preload, priority or fetchPriority applied to many images, diluting the hint meant for the single LCP element.
  5. Hero backgrounds set through CSS background-image, which bypass next/image resizing and format negotiation entirely.

Concrete deliverables, no fluff

Every engagement ends with measurable, documented outcomes — no black-box agency reports.

  • Root cause analysis with reproduction
  • Targeted fix with no scope creep
  • Verification on staging + production parity check
  • Runbook for future incidents

What changes after we ship

  • LCP images that load first

    The real LCP element on each template gets eager, high-priority loading and an accurate sizes value, and nothing else competes with it for early bandwidth.

  • Right-sized srcsets per breakpoint

    Each image’s sizes value and the deviceSizes list match your grid, so phones stop downloading desktop-width files while high-density screens still get sharp images.

  • AVIF and WebP enabled deliberately

    We weigh AVIF’s smaller files against its slower first encode and the extra cache storage two formats need, and serve SVGs unoptimized with a content security policy.

  • An image pipeline that fits hosting

    Self-hosted servers get sharp configured with memory in mind, while high-volume catalogs can switch to a custom loaderFile backed by an image CDN when the built-in optimizer becomes a bottleneck.

From brief to shipped fix

A transparent, low-risk process — a senior engineer reads your brief personally, and nothing starts until you approve a written plan and price.

  1. 01Day 0–1

    Diagnose

    A senior engineer reviews your brief, reproduces the issue, and pinpoints the real root cause — not the symptom — before any code is touched.

  2. 02Within 24h

    Scoped plan & quote

    You get a written plan to fix Next.js Image Optimization, a firm timeline, and a fixed quote. Nothing starts until you approve it — no surprise invoices.

  3. 031–3 weeks

    Ship the fix

    We implement on a branch and open a pull request you review, working to your code-review standards on your repo — never a black box.

  4. 04On delivery

    Verify & hand off

    We verify on staging and production, share before/after evidence where it applies, and leave you a short hand-off note so the fix sticks.

Situations we handle

  • Headless CMS and DAM images

    Editors upload originals to Contentful, Sanity or a DAM, and each new asset host breaks rendering. We configure strict remotePatterns and, where the CMS already resizes, a loader that uses its image URL API.

  • Product grids on e-commerce pages

    Category pages render dozens of thumbnails in a responsive grid. Accurate sizes values, a deliberate quality setting and lazy loading below the first row cut transferred bytes without visible quality loss.

  • Static exports and non-Vercel hosts

    Static exports cannot use the default image optimizer, so we add a custom loader backed by an image CDN, keeping images responsive on S3, Cloudflare Pages or a plain Nginx server.

Why teams hand this task to Krapton

  • Senior engineers only

    Your brief is read and handled by a senior engineer — no junior hand-off, no sales-rep filter in between.

  • Root cause, not a patch

    We reproduce and fix the underlying cause, then add a guard so the same class of issue does not quietly return.

  • Your repo, your standards

    Every change lands as a pull request you review, on your repository, following your existing review process.

  • NDA on day one

    Confidentiality and IP are covered before we look at a single line of code. All work stays in your accounts.

  • Fixed quote up front

    You approve a written plan and price before work starts. If scope changes, we re-quote in writing — no surprise invoices.

  • Proof, where it applies

    Performance, SEO and reliability work ships with before/after evidence so the result is measurable, not anecdotal.

Three ways to engage

No retainer required. Pick the model that matches the work — pricing for this task starts from $500, with a fixed quote before anything starts.

  • Per task

    Most popular

    One clearly-scoped fix at a fixed price. Best when you know exactly what is broken and want it handled end to end.

    • Fixed quote up front
    • One PR, reviewed by you
    • No retainer required
  • Hourly

    Pay only for the hours worked. Best for diagnostics, audits, or exploratory work where the scope is still emerging.

    • Weekly timesheets
    • Pay for what you use
    • No minimum commitment
  • Per sprint

    A focused 1–2 week sprint when the work is bigger than one fix but smaller than a full project.

    • 1–2 week blocks
    • Clear sprint goal
    • Scale up or stop anytime

Industry-standard stack, no proprietary lock-in

  • Next.js 14
  • RSC
  • Vercel
  • Edge runtime

Fix Next.js image optimization — your questions, answered

How much does it cost to fix Next.js Image Optimization?

Pricing starts from $500 and depends on the scope we find during the diagnostic. You get a fixed, written quote before any work begins — most engagements like this run 1–3 weeks.

How long does it take to fix Next.js Image Optimization?

Typically 1–3 weeks for a focused engagement. After a short diagnostic we commit to a firm timeline so you know exactly what to expect.

Do we need an image CDN to fix Next.js image optimization?

Usually not. The built-in optimizer handles most sites well once sizes, loading priority and formats are right. An image CDN such as Cloudinary, imgix or Cloudflare Images starts to make sense for very large catalogs, transformations beyond resizing, or moving optimization load off your servers, and we connect it through a custom loader so components stay unchanged.

Why did our images change after upgrading to Next.js 16?

Because several image defaults changed in that release. The priority prop is deprecated in favor of preload, images.qualities allows only 75 unless you list other values, minimumCacheTTL rose to four hours, local images with query strings now need localPatterns, and remote images may follow at most three redirects. We review each change against your usage and set the config explicitly.

Should every above-the-fold image be preloaded?

No. Preloading helps the one image that is the LCP element on a given viewport; marking several images that way makes them compete with each other and with critical CSS. When the LCP image differs between mobile and desktop, we use art direction with a picture element and fetchPriority, so only the matching image loads early.

Let's get this off your plate

Send a 60-second brief on Fix Next.js Image Optimization and a senior engineer replies within 24 hours with a plan and a fixed quote. NDA on day one, no retainer required.