Vehicle images in React, resolved on the server, passed down as props, stable in every grid.

React teams meet two problems on the same afternoon: the API key must never reach the browser, and a grid of vehicles must not jump while it loads. Resolve where your secrets live, ship URLs to the client, and both problems stop existing.

LP react: hero1
LP react: hero2
LP react: s1

Your API key does not belong in the browser

A fetch from a client component hands your key to anyone who opens devtools. Resolve vehicles in a route handler, a server component or your own backend, and the browser only ever sees finished image URLs.

  • The key stays server side, in an environment variable
  • Image URLs are plain strings, safe to pass as props
  • No CORS configuration, because the browser only loads images

The integration, React edition

Resolve once, pass URLs down, let the browser cache. Nothing clever happens here, and that is the point.

01
Install the SDK

npm i vehicleimagery, then create the client where your secrets already live, not inside a component.

02
Resolve the vehicle

A VIN, a number plate or make, model and year go in. Image URLs for every angle come back.

03
Pass URLs as props

Your card takes a string. No provider, no context, no client side fetching, no loading waterfall.

04
Lock the aspect ratio

A fixed ratio wrapper plus a width parameter that matches the rendered size removes layout shift before it can happen.

LP react: s2

Grids that do not jump

Layout shift in a vehicle grid is nearly always an unsized image. Request the width the card actually renders, wrap it in a fixed ratio box, and the grid settles on first paint instead of settling twice.

  • Width, format and quality are request parameters
  • Identical framing across vehicles, so cells line up
  • Transparent WebP covers dark mode without a second asset

Vehicle images in React, in practice

Most React codebases start with a placeholder image and a promise to fix it later. The fix usually arrives as a client side fetch inside a card component, which is where the trouble begins: the key is exposed, every card opens its own request, and the grid reflows as answers arrive at different times. The API is fast, but the pattern is wrong.

The version that holds up is unglamorous. Resolve vehicles wherever you already load listing data, keep the resulting URLs on the listing object, and let cards render an img tag with a width that matches their layout. The browser caches by URL, the CDN handles the rest, and your component tree stops knowing that an image API exists at all.

What React teams ask

Can I call the API from a client component?

You can, but you should not. A client component runs in the browser, so the key travels with it. Resolve in a route handler, a server component or your backend and pass URLs down as props.

Does this work with React Server Components?

Yes, and it is the cleanest fit. Resolve inside the server component that loads the listing, then render the URL directly. Nothing about the integration reaches the client bundle.

Do you ship a React component?

No, and deliberately so. The npm package is framework agnostic and returns URLs. A vehicle image is an img tag, and wrapping that in a component we control would only get in the way of your design system.

How do I stop layout shift?

Give the image a fixed aspect ratio container and request the width you render. Because framing is identical across vehicles, one ratio works for the whole grid.

What should a card show while loading?

A neutral placeholder at the same aspect ratio. Since the URL is known before render, images usually load without a visible placeholder step.

Does it work with React Native?

Yes. The URLs are ordinary HTTPS image URLs, so the Image component consumes them directly. Resolve on your backend, exactly as you would for the web.

Try it in a branch

Tell us what your listing data looks like and which sizes your cards use. We come back with image URLs ready to drop into your components.

  • Sized WebP variants for your exact card widths
  • Transparent cutouts for dark mode
  • The trial covers a real integration branch
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.

Put real vehicles in your grid

Send us a few VINs or specs from your data and the card widths you render. You get URLs you can paste into a branch today.

Usually the same working day.