Vehicle images in Next.js, resolved in a server component, rendered through next/image, cached where you already cache.

Next.js gives you a server on every route, which is exactly where vehicle imagery belongs. Resolve the vehicle where you load the listing, hand the URL to next/image, and let ISR decide how often any of it runs again.

LP nextjs: hero1
LP nextjs: hero2
LP nextjs: s1

The server component is the integration

There is no client state to manage and no effect to write. The component that fetches your listing also resolves its images, and the browser receives finished markup with the URL already in place.

  • The API key stays in a server environment variable
  • No client bundle cost, because nothing ships to the browser
  • Works the same in the app router and in route handlers

The integration, Next.js edition

Four steps, one of which is a config file you edit once and forget.

01
Install and configure

npm i vehicleimagery, put the key in an environment variable, and add our image host to remotePatterns in next.config.

02
Resolve in the server component

The same component that loads the listing resolves its vehicle and gets back URLs for every angle.

03
Render through next/image

Pass the URL with explicit width and height. The optimizer handles srcset, and the fixed dimensions handle layout shift.

04
Cache with ISR

Vehicle imagery changes when your catalogue does, not per request. A revalidate window measured in hours is usually generous.

LP nextjs: s2

Two caches, and you want both

Our CDN caches the image, and your ISR cache holds the resolution result. Together they mean a busy vehicle detail page can serve thousands of visits without a single call leaving your server.

  • Stable IDs make revalidation predictable
  • Cache the lookup, not just the bytes
  • Rebuild on catalogue changes, not on every deploy

Vehicle images in Next.js, in practice

The most common mistake is treating vehicle imagery as a client concern in a framework that hands you a server for free. A useEffect in a card component works in development and then shows up in production as exposed credentials, a slower Largest Contentful Paint and a grid that reflows while data trickles in.

Resolving during render removes all three at once. The listing query and the image lookup happen in the same place, the result is cached by the same revalidation rules as the rest of the page, and next/image sees a normal remote URL. The integration ends up being a handful of lines in a file you were going to write anyway.

What Next.js teams ask

Does next/image work with your URLs?

Yes. Add our image host to remotePatterns in next.config and the optimizer treats them like any other remote image.

App router or pages router?

Both. The app router is the better fit because resolution belongs in a server component, but a getServerSideProps or getStaticProps call works identically.

Should I use ISR or fetch on every request?

ISR, in almost every case. Vehicle imagery changes with your catalogue rather than per visitor, so a revalidate window of several hours is usually more than accurate enough.

Can I run this on the edge runtime?

Yes. The SDK uses fetch and has no Node specific dependencies, so edge route handlers and middleware work without a shim.

Do I need the optimizer at all?

No. You can request the exact width you render and skip next/image entirely. The optimizer is convenient for srcset, not a requirement.

How do I handle a vehicle we do not cover?

The response tells you when a fallback model year was used, so you can decide between showing it, showing a branded placeholder or hiding the image slot.

Try it on a preview deployment

Tell us which routes show vehicles and what sizes they render. We come back with URLs and the remotePatterns entry you need.

  • Sized variants for your exact layouts
  • A remotePatterns snippet for next.config
  • The trial covers a full preview deployment
Thanks. We have your message and will come back with image URLs for your setup.
Something went wrong. Please try again or write to info@vehicleimagery.com.

Ship it behind a feature flag

Give us a few VINs or specs and the routes you would put them on. You get URLs and a config snippet the same day.

Usually the same working day.