What is Partial Image Matching?
When LPagery processes images, it needs to find matching files in your WordPress Media Library.
By default, Partial Image Matching is enabled. This allows flexible substring matching, meaning LPagery can resolve images even if the filename in your source data is not an exact match.
ℹ️ Filenames with -scaled are treated the same as their non-scaled versions.
Examples (Partial Matching Enabled)
Input value → matched files
beach→
beach.jpg,sunny-beach.png,beach-scaled.jpg,uploads/2023/beach.jpegmountain→
mountain.png,mountain-scaled.png,alps-mountain-photo.jpghotel-exterior→
hotel-exterior.jpg,hotel-exterior-scaled.jpg
This flexibility is convenient, but on sites with thousands of images, it can slow down image processing because LPagery must scan many filenames.
When to Disable Partial Image Matching
Disable this setting if:
Your media library contains 10,000+ images and image processing is slow
You always use exact filenames in your source data (e.g.
beach.jpginstead ofbeach)You want maximum page creation performance
Behavior When Disabled
When Partial Image Matching is disabled, only exact filename matches are allowed.
-scaled and non-scaled versions are still treated as identical.
Examples:
forest.png→ ✅ matchesforest.pngforest→ ✅ matchesforest.png(extension optional)FOREST.PNG→ ✅ matchesforest.png(case-insensitive)forest→ ❌ does not matchdeep-forest.pnghotel-exterior→ ❌ does not matchhotel-exterior-scaled.jpg
How to Configure
Go to LPagery → Settings
Ensure Image Processing is enabled
Toggle Partial Image Matching on or off
Click Save Settings
ℹ️ The Partial Image Matching toggle only appears when Image Processing is enabled.
Best Practices
Scenario | Recommendation |
Small media library (< 1,000 images) | Keep enabled for flexibility |
Large media library (10,000+ images) | Disable for better performance |
Using exact filenames ( | Can disable safely |
Relying on partial matches ( | Keep enabled |
Technical Details
When Partial Image Matching is disabled, LPagery uses an optimized lookup table with O(1) search performance instead of scanning the entire media library.
This lookup table is automatically kept in sync when images are uploaded or deleted, ensuring fast and reliable image resolution even on very large sites.
