Add audit tool to identify media attachments missing local original files

Open
#1,231 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
php, wordpress
Domain
backend

Research direction

Start by locating the Optimole admin settings code and the code that reads WordPress Media Library attachment metadata and local upload paths. Check how existing settings tools report results and whether they support exports. Done means a bulk scan identifies missing local originals, shows a summary and detailed list, and exports the missing paths or IDs.

Written by the indexing model from the issue text.

Description

customer report feature-request-triage

Impact: 65 · Confidence: 90 · Complexity: 50

Description

Problem: When image offloading was enabled or plugins were disconnected, site owners who wish to restore local files or check media library health have no automated way to determine which Media Library entries are missing local physical files in /wp-content/uploads/.

Desired Behavior: Provide a bulk diagnostic check/audit tool in Optimole settings (or Media Library) that scans Media Library attachments, verifies local file existence on the server, and outputs a list/CSV of missing files to streamline targeted backup restoration.

Acceptance Criteria:

  • A scanner tool in Optimole admin settings that checks attachment metadata against server disk paths.
  • Displays a summary and detailed report of attachments whose local original files return 404 / file not found.
  • Allows exporting the list of missing file paths/IDs to assist with selective manual or backup restoration.

Customer Context

The customer has offloaded images that were deleted from cloud storage after account expiration. They have standalone image backups but need a quick automated method to figure out which specific image files are missing locally so they don't have to check thousands of product images manually.

Root Cause Analysis

The customer needs to repair broken image paths on their site by restoring only the missing files from local backups. Optimole currently lacks any built-in diagnostic scan or missing-file inventory tool to check WordPress Media Library attachments against local physical disk availability. Site owners must manually inspect file paths or use third-party tools to identify missing originals.


Source: HelpScout #3344740257
Generated by feature-request-triage workflow (ID: feature-request-triage_6aee4e0852bbc5.14091123)

Dominant language
PHP
Stars
74
Forks
14
Avg merge
1d 20h
Merged PRs (30d)
39

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Codeinwp/optimole-wp

All issues in Codeinwp/optimole-wp

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.