Images not showing in media grid view (but showing in list view)

Question

In my WordPress install, thumbnail images are not showing in the media library, when in grid view. They are showing when in list view.

In addition, if I once request a thumbnail directly, in the browser, by copy/paste of the image URL, the image afterwards shows up in the grid view, too. For all users, anywhere.

The console shows errors like this, for each failed image:

[Error] Failed to load resource: the server responded with a status of
404 () (filename.jpg, line 0)

But, requesting each image directly shows the image and then, reloading the grid, shows the image in the grid.
(However, a script that lists all images in the relevant upload folder, then displays them with an image tag, or inside an iframe does not have the same effect.)

This started happening after moving my site to a new hosting provider.

Newly uploaded images display the same behaviour.

What is causing this? How to fix this?

Edit:

Turning on WordPress’ debug mode, showed the file “advanced-cache.php” was faulty. Replacing that with a backed up copy resulted in a complaint related to the “WP Super cache” plugin, even though that plugin was deactivated. Deleting the plugin saw that error message also disappear.

However, in the console, a section now showed up with the heading “PHP Errors in Ajax Response”, and errors referencing the plugin “display-all-image-sizes”. Disabling then deleting this plugin resulted in the errors going away, but the images still not showing in the image grid.

Also, the file “advanced-cache.php” disappears on its own accord. Some digging made me understand that some caching plugin was responsible for this, even though no caching plugin was active. However, turns out that wp-config still had a hardcoded caching reference:

define(‘WP_CACHE’, true);

I changed that to ‘false’. This saw the errors go away, but the images still not showing.

0
, , MastaBaba 4 years 2018-11-14T07:14:33-05:00 0 Answers 94 views 0

Leave an answer

Browse
Browse