Patreon Broke Images and Wordpress Media Gallery

I am posting this because I hope it will help someone.

Summary: The Pattern Plugin creates a conflict in Wordpress 5.2.2. that prevents the Media Gallery from loading and corrupts images in Wordpress site.

The Setup: I installed the Patreon plugin on the site, coffeeancreamlifestyles.com, I am https://www.patreon.com/lamarj https://www.patreon.com/lamarj on Patreon. I connected the sites via the API instructions.

The Turn: I noticed that that Media Gallery stopped working correctly and my site looked terrible. None of the images would load properly. Later I removed the Patreon plugin for a totally separate reason.

As part of trying to fix my site I, in no particular order:

  • Reinstalled Wordpress
  • Deleted and reinstalled my theme
  • Changed themes
  • Deactivated all my plugins
  • Used a forced regenerate plugin to force new thumbnails to be regenerated
  • Changed the CHMOD permissions on the uploads folder
  • Deleted ALL the images and uploaded just 1 image
  • Tried caching plugins

There is other stuff I just don’t remember

The Prestige: My host has excellent techs, one went in and here is what he did in his words to fix the problem. Please remember the Patreon plugin had been deleted from Wordpress via the deactivate and uninstall option weeks ago

At this time I was able to see that these were being blocked by the following code with the .htaccess file. I was able to remove this and now if you look in the media library these should be loading.

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

The relevant htaccess code only goes active if you turn on image locking feature - which you must specifically turn on for it to happen. That means either you or someone else must have turned it on.

As for breaking images in media gallery - there isnt any particular issue reported like this from other users of image locking feature. Any image that is not locked should be visible by non admins and non patrons - be them full size or thumbnail. Similarly any image that is locked should display a placeholder to anyone who is not an admin or a valid patron.

I would guess that there is a particular setup at your host or your website - or one of the plugins you use - which interferes with normal functioning of image locking feature.

You can also just turn off image locking feature if you dont need it, which would be much better in terms of performance. Image locking is a performance-heavy feature. It can also cause issues with entry level shared hosting accounts.

Thanks. It is a non-issue for me. I posted because the patreon developer people recommended I post it. I hope this helps someone.

1 Like

with activated Picture Protect mode, it breaks also the media library in the backend - please support and advice on this issue