The Core Concept

The Localizer WordPress plugin automatically replaces images on your site with localized versions. It does this by matching the base_name of images.

What is base_name?

Every image in Localizer has a base_name - a unique identifier used to match images between WordPress and Localizer. Example base_names:
  • hero-image
  • storefront-photo
  • product-banner-1

How Matching Works

When a visitor loads your page, the plugin automatically matches images using base_name: In simple terms:
  1. Plugin scans the page for images
  2. Extracts filename (without extension) to get base_name
  3. Looks up matching base_name in Localizer
  4. If found, checks for city-specific variant
  5. Falls back to state → sitewide → original if needed
  6. Displays the appropriate image

Scenario 1: Using Reference Images

When you sync images from WordPress and use them as references:
1

You sync hero-image.jpg from WordPress

Image uploaded to Localizer Mood Board
2

You generate localized variants

Houston, Austin, Dallas versions created
3

base_name automatically set

Localizer uses the original filename: hero-image
4

Swapping works automatically

WordPress image hero-image.jpg matches → gets swapped

Scenario 2: Creating New Images (No Reference)

When you generate brand new images in Localizer without a reference:
1

You create a new image in Localizer

Using text prompt or other method
2

No automatic base_name

Localizer assigns a random ID
3

You must set base_name manually

Go to Asset Details → Set Base Name
4

base_name must match your WordPress image

If your WordPress image is banner.jpg, set base_name to banner

Setting base_name Manually

To set or change an image’s base_name:
  1. Open the asset in Localizer
  2. Go to Asset Details
  3. Find the Base Name field
  4. Enter the filename (without extension) of the WordPress image you want to replace
  5. Save changes
Setting base_name in asset details

Scenario 3: New WordPress Site (No Existing Images)

If you’re building a new WordPress site: Option A: Create images in Localizer first
  1. Generate localized images in Localizer
  2. Set meaningful base_names (e.g., hero, about-banner)
  3. In WordPress, name your images to match those base_names
  4. Swapping works automatically
Option B: Add placeholder images to WordPress first
  1. Upload placeholder images to WordPress with your intended filenames
  2. Sync to Localizer
  3. Use as references to generate localized variants
  4. Swapping works automatically

Quick Reference

Scenariobase_name Set Automatically?Action Needed
Reference image from WP sync✅ YesNone
New image with reference✅ YesNone
New image without reference❌ NoSet manually in Asset Details

Troubleshooting

Check:
  1. Is the base_name set correctly in Localizer?
  2. Does it match your WordPress image filename (without extension)?
  3. Have you generated a localized variant for the visitor’s city?
  4. Is the plugin connected and working? (Test Connection)
In Localizer, click on the asset and check Asset Details. The base_name field shows the current value.
No - base_names must be unique within a website. If you try to set a duplicate, you’ll get an error.
Letters, numbers, and hyphens. No spaces or special characters.Good: hero-image, banner1, about-us Bad: hero image, banner@home, about_us

Next Steps