Finding duplicate images in a WordPress media library, without flagging WPML translations
Описание и применение
Найдите точные дубликаты изображений в мультиязычном WordPress‑сайте, избегая ложных срабатываний из‑за переводов WPML. Используйте хеш‑фингерпринт, группировку по переводам и проверку отсутствующих файлов.
Задача
Detecting exact duplicate images in a multilingual WordPress site without mistakenly flagging language‑specific attachments or breaking alt‑text audits.
Результат
The updated Filikod plugin accurately identifies true duplicate images, removes false positives caused by multilingual attachments, flags orphaned files, and improves alt‑text audit scores without deleting or merging files.
Рабочий процесс
- 1. Fingerprint each image file’s bytes and store the hash.
- 2. Detect duplicate hashes and group attachments sharing the same hash.
- 3. Load translation‑set mappings (WPML table, Polylang taxonomy, Bogo meta) to collapse groups per language set.
- 4. Apply the same rule to alt‑text audit: count alt duplicates only across distinct images.
- 5. Identify attachments whose file no longer exists on disk and list them with usage paths.
- 6. Suppress third‑party filters in admin queries using 'suppress_filters'=>true to get accurate counts.
- 7. Present results in the plugin UI: duplicate groups, redundant files, orphaned attachments, and upload‑time warnings.
Доказательства
"I shipped duplicate image detection in Filikod, the free alt text audit plugin I maintain."
"After the fix the same library gave 29 groups and 30 redundant files."
"The scan finished with 232 images 'still waiting'. They were not waiting."
- Дата записи: 2026-09-22T08:30:27.542Z