Skip to content
Errors after an update

Images don't show in the media library

The media library is empty or keeps loading. A plugin may be interfering, or files went missing in a move.

You need
WP admin
Updated

The media library shows the images WordPress has registered in the database. If it's empty or keeps loading, that doesn't mean the images are gone from the server. A plugin or the theme may be sending invalid JSON when the library fetches the images. If the images show as empty tiles, the browser can't load the files themselves, for example because they're missing after a move.

Switch to list view

Go to Media → Library and click the "List view" icon at the top, or open /wp-admin/upload.php?mode=list. The grid view fetches the images in the background, while the list view is built directly by the server. Comparing the two shows where the fault is:

  • If the images show in the list but not in the grid, a plugin or the theme is sending invalid JSON to the grid. See how to find the plugin.
  • If the list also says "No media files found.", the images aren't registered in the database. See images added over FTP.
  • If the images are listed but with empty or broken thumbnails, the browser can't fetch the files. After a move, the files may be missing on the server, or their URLs may point to the old domain. Incorrect folder permissions have the same effect. See how to check the uploads folder.

Find the plugin that sends invalid JSON

The grid fetches the images as JSON from admin-ajax.php. If a plugin responds with PHP warnings or error messages before the JSON data, the library keeps loading. You can see the response in the Network tab of your browser's developer tools when you reload the library.

  1. Go to Plugins → Installed Plugins.
  2. Deactivate the plugins one by one, starting with those installed or updated most recently. Reload the media library after each.
  3. If none of them helps, switch to a default theme under Appearance → Themes and try again.

Once you have found the plugin, look for an update or replace it.

Check the uploads folder

Go to Tools → Site Health and choose the "Info" tab. Under "Filesystem Permissions", "The uploads directory" should say "Writable". Under "Directories and Sizes", "Uploads directory location" shows where WordPress stores the files. Open that folder over FTP or with the file manager in your hosting panel. If the images are missing there, copy them back to the same place from the old server or from a backup.

If you see the fields "Store uploads in this folder" and "Full URL path to files" under Settings → Media, a custom upload folder or URL has been set. After a move, they can point to a folder that doesn't exist on the new server, or to the old domain.

Fix the permissions with FTP or the file manager in your hosting panel:

  1. Right-click wp-content/uploads and choose the file permissions option.
  2. Set folders to 755 and files to 644, including subfolders.
  3. Never use 777. It lets anyone on the server write to the folder.

If the permissions are right and WordPress still can't write, the storage on your hosting account may be full. You can check that in the hosting panel. Otherwise the files may be owned by a different user than the one PHP runs as, or the server may be set up so PHP can't write to the folder. Only your hosting provider can fix that.

Images added over FTP

The media library only shows files uploaded through WordPress. Images you copied straight into wp-content/uploads over FTP are on the server, but WordPress doesn't know about them. Upload them again under Media → Add Media File. If there are many, register them with WP-CLI without copying the files again:

wp media import wp-content/uploads/2026/10/*.jpg --skip-copy

When you're stuck

If the library is still empty with plugins off, a default theme active and the permissions right, the images may have been lost in a move, or the database may be damaged. Your hosting provider can check who owns the files and look in the server's error log. If you don't have access to the hosting panel, ask whoever runs the site for it first.