Vehicle images in WordPress, resolved in PHP, cached in a transient, rendered by a shortcode.

A dealer site on WordPress usually carries a media library of inconsistent photos and a plugin that scrapes more of them. Replace both with one lookup: the vehicle resolves in PHP, the URL is cached, and the template renders an ordinary image tag.

LP wordpress: hero1
LP wordpress: hero2
LP wordpress: s1

The media library stops growing

Every uploaded vehicle photo is a file to store, a thumbnail set to generate and a backup to carry forever. Images that resolve on demand live on our CDN, so your uploads folder stays the size it is today.

  • No uploads, no thumbnail regeneration, no orphaned files
  • Consistent framing across every listing in the theme
  • Backups stop growing with your inventory

The integration, WordPress edition

A small plugin file, a transient and a shortcode. No build step and no JavaScript.

01
Store the key

Put the API key in wp-config as a constant, so it never sits in theme files or in the database.

02
Resolve in PHP

Call the API with wp_remote_get from a small plugin, using the VIN or the make, model and year already stored on the post.

03
Cache in a transient

Store the resolved URL with set_transient for a day. Listings render from cache and the API is called once per vehicle.

04
Render with a shortcode

Register a shortcode or a template tag that outputs an img tag with the width your theme actually uses.

LP wordpress: s2

Page builders and listing themes are fine

Because the output is a plain image tag with a URL, it drops into Elementor, Divi, Bricks or a custom theme without special handling. Custom fields hold the VIN, the shortcode does the rest.

  • Works with ACF, custom fields and custom post types
  • No block editor extension required
  • Transparent variants for themed backgrounds

Vehicle images in WordPress, in practice

WordPress dealer sites tend to accumulate imagery rather than manage it. Someone uploads photos for a batch of cars, someone else installs a plugin that pulls more from a feed, and a year later the media library holds thousands of files at four different crops with no consistent lighting between them.

Resolving on demand inverts that. The post already knows which vehicle it is, so the image can be derived from the data instead of attached to it. A transient keeps the API call rare, the CDN keeps delivery fast, and the listing archive finally looks like one catalogue rather than twelve photographers.

What WordPress teams ask

Is there an official plugin?

Not yet. The integration is small enough that most teams write a short plugin file against the REST API, and we are happy to review it.

Where should the API key live?

In wp-config as a PHP constant. Keep it out of theme files, out of the database and out of anything the block editor can reach.

Will this slow down my listing archive?

Not if you cache. With a daily transient per vehicle, an archive page renders entirely from cache and makes no outbound calls at all.

Does it work with WooCommerce?

Yes. Store the VIN or the spec as product meta and resolve from there, exactly as you would for a custom post type.

What about page builders?

They work unchanged. The shortcode returns an image tag, which every builder can place inside its own layout.

Can I still upload real photos?

Yes, and many dealers do for used stock. A common pattern is real photos where they exist and resolved imagery everywhere else.

Try it on a staging site

Tell us which theme or page builder you use and how vehicles are stored. We come back with a working snippet for your setup.

  • A shortcode sized for your theme
  • A caching pattern that fits your traffic
  • The trial covers a full staging rollout
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.

Clean up the media library

Send us a handful of VINs from your listings and the width your theme renders. You get URLs and a shortcode you can paste in.

Usually the same working day.