Initial assessment without passwords Quote before intervention One accountable specialist from start to finish

Recovery & Prevention

WordPress Media Library Grid Not Loading: REST, AJAX and Attachment Queries

A blank media grid can be a JavaScript error, failed AJAX/REST response, database query or image metadata problem. Inspect the request.

If Media Library list view works but grid view does not, the attachment files probably still exist. The failure is more often in the JavaScript request, admin AJAX/REST response, a plugin filter or an expensive attachment query.

Compare list and grid before touching thumbnails

Open both views with the same account. If list view returns attachments, regenerating every image is unlikely to fix the grid. Capture the browser console and the network response generated when the grid requests more media.

The response body usually identifies the layer

Expected JSON replaced by a PHP warning, HTML error page, WAF block or timeout points to server-side handling. A clean response with a JavaScript exception points back to the admin UI.

Isolate admin-only conflicts carefully

  • test browser extensions and optimisation scripts;
  • inspect plugin filters on attachment queries;
  • check PHP memory and query time;
  • identify any attachment with malformed metadata before bulk repair.

Do not regenerate the whole library as a diagnostic

That can add load without changing the request path that is actually failing.

Use adjacent symptoms to narrow the cause

If the files themselves are broken after a move, use the migration image checks. If PHP cannot read or write the files, compare ownership and permission diagnostics.

Verification

Grid and list views should load across several pages, selecting media in the editor should work, and the same request should complete without JavaScript, PHP or database errors.

WP REPAIR INCIDENT STANDARD

Safe intervention sequence

The Network response for the media query is more useful than regenerating every thumbnail.

WP RepairDiagnostic model
1Symptom2Evidence3Controlled change4Verification
Follow the chain until you find the first point that stops behaving as expected.
  1. Compare Media Library list and grid views.
  2. Capture console errors and the attachment-query response.
  3. Read PHP logs for memory, SQL or metadata errors at the same time.
  4. Test with browser extensions and script optimisation disabled for your session.

What must be verified

  • Grid and list views load across multiple pages.
  • Uploading and selecting media works in the editor.
  • No PHP or JavaScript error appears during attachment queries.

ABOUT THIS SYMPTOM

Frequently asked questions about this guide.

If the Media Library list view works but the grid view doesn't, does that mean attachments are corrupted?+

No. When list view loads correctly, the attachments themselves exist and are queryable — the failure is more likely a JavaScript conflict in the admin, an invalid AJAX response, or something in the grid-specific request path, not corrupted media data.

Should I regenerate all thumbnails as a first step when the grid view fails to load?+

No. Global thumbnail regeneration can take hours and does not address a failed admin request — the Network response for the attachment query itself is more useful for diagnosing this than any bulk media operation.

Can a security plugin or firewall be the reason the grid view won't load?+

Yes. A WAF block or a PHP warning inserted into the response can replace the JSON WordPress expects for the attachment query, which breaks the grid view exactly like a script conflict would, so both need to be checked from the actual server response.

Can one problematic image break the grid view for the entire media library?+

Yes, if a plugin assumes every attachment has certain image metadata fields. One attachment missing that expected metadata can cause the query or metadata handler to fail for the whole grid, even though most files are unaffected.

BEFORE YOU SEND THE REQUEST

Frequently asked questions.

Do you ask for passwords in the form?+

No. The public form never requests access. Secure credentials are requested only after the scope and quote are approved.

Who reviews the incident?+

The request goes to Jordi Ensenyat, founder of Code Barcelona and a WordPress specialist with more than 15 years of experience.

Is anything changed before the quote?+

No. Visible symptoms and scope are reviewed first. Intervention begins after approval and with a rollback path prepared.

Do you work internationally?+

Yes. WP Repair handles WordPress and WooCommerce incidents in English and Spanish through a remote service.

Assess my incident