If you're seeing the wrong image when using LPagery’s image processing feature, the issue is likely caused by a generic file name (e.g., 1.jpg
) in your source file. Here's why this happens and how to fix it.
Why Does This Happen?
WordPress searches for images by their file names. If your image file name is too generic, like 1.jpg
, WordPress may find other images that contain the file name too, such as test321.jpg
. This can result in the wrong image being shown in the confirm creation modal or on the generated pages.
How to Fix It
1. Use Unique File Names
Rename your image file to something specific and descriptive.
Example: Instead of1.jpg
, useour-team-in-city-1.jpg
.WordPress will now search for the entire file name (
our-team-in-city-1.jpg
) instead of just part of it (1.jpg
), which prevents mismatched results.
2. Make the File Name Even More Unique
If the issue persists, add numbers or other unique details to the file name.
Example: Changeour-team-in-city.jpg
toour-team-in-city-2024.jpg
.
3. Update the Template Page
Update the featured or placeholder image on your template page to match the renamed file name.
4. Update the Source File
Ensure the updated file name is used in your source file.
Example:
city | our-team-in-city-2024.jpg |
New York | nyc-our-team-2024.jpg |
London | london-our-team-2024.jpg |
Why It’s Better for SEO Too
Descriptive and unique file names improve SEO. They help search engines understand the image content, making your pages rank higher.
Final Check
After making these changes:
Go to the LPagery Settings > Image Processing and ensure it’s enabled.
Recheck the confirm creation modal to verify the correct images are displayed in the header bar.