Images/thumbnails Not Loading? Patreon Plugin May Be Culprit
I had a problem where the images/thumbnails at one of the WordPress sites had completely disappeared. After thinking the issue was caused by an old PHP version, both PHP and easyapache were updated. The update was needed but wasn’t really what caused the problem.
If you’re having an issue where you thumbnails disappeared, sporadically loads, or loads then disappears as the webpage is loading, check your .htaccess file.
In my case, I installed Patreon integration via a WordPress plugin called:
“Patreon WordPress”
https: //wordpress.org/plugins/patreon-connect/
When it was no longer needed, I deleted the plugin. However, that plugin apparently amends the .htaccess file by adding the following code:
# BEGIN Patreon WordPress Image Protection RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} (\.png|\.jpg|\.gif|\.jpeg|\.bmp) RewriteCond %{HTTP_REFERER} !/wp-admin/ [NC] RewriteRule ^wp-content/uploads(.*)$ index.php?patreon_action=serve_patron_only_image&patron_only_image=$1 [QSA,L] # END Patreon WordPress
If you delete or deactivate the Patreon plugin — or if it is in conflict with another plugin — it may cause all of your images to magically disappear!
For me, removing the code made all images load again without issue.
If you’re having a similar error, check your .htaccess file to make sure one of your plugins hasn’t written code into the file which is causing errors in your WordPress site.