Cannot lock images when uploading and updating media

Hello,

I uploaded an image and set the minimum amount/tier required for that.
Unfortunately, arghhh… It does not save my settings and the image is visible in my test post.

How can I fix this issue?

Thanks in advance

Have you turned on image locking feature in Patreon Settings?

Yes, I did.

In the media library, I can only set and save correctly the required amount to see the image in the single text line under the image.

Instead, the values set in the right-side box are never stored.

I embedded a test image into a post and I was expecting that only the image was locked inside the post (i.e., a message should be shown?).

Instead, the image is always visible and linking to the patreon site.

Is that the expected behavior?

Many thanks in advance

If the image is linking to Patreon, then the image may have been locked, but your browser may not have refreshed the image and it may instead be serving the image from the cache. This would lead you to seeing the unlocked state of the image still.

Trying a hard refresh (CTRL + F5 for most devices/browsers) may help.

If you use a CDN like Cloudflare etc, that also may cause this kind of issue.

I made a test post. I’m expecting to have a hidden/locked image.
Instead, the image is visible.

Please, check following URI:

The cache is disabled for the post.

Noted.

There are rewrite rules which must be present in your htaccess file for the image locking to work. They are:

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

Please check your .htaccess file and verify that they are there.

Its possible that your host may be using Nginx or Multisite and therefore these rules may not come into effect. In that case contacting your host and asking about these rules may help.

I have those rules in my .htaccess file.
What should my hosting change?
Can these rules be at the end of the .htaccess file?

First of all contact them to confirm that what you have in your htaccess file is actually processed. Some hosts may have setups which do not recognize mod rewrite rules saved in htaccess files.

Order of placement of those particular rules should not matter. But they should be in the block they are.

Ok, the problem cannot be fixed on my server.
Thanks the same.

Just another question: should the locked post be always not cached? Thanks

Ok, the problem cannot be fixed on my server.

You can move to any standard hosting plan at any standard host, and you should be able to use the image lock feature.

Not caching locked posts is generally a very good idea. Its hard to predict where will caching kick in - at your server, your site, user’s browser, user’s ISP or any CDN that enters the equation.

My hosting provider is using NGIX.
It is bad I cannot use this feature.

The same rules can be effected in nginx. There is a relevant thread in the forum somewhere. WP Engine for example, allows you to add such rules in the below manner.

The same rules can also be translated into nginx format manually.

I cannot create this kind of redirects from my control panel (I’m using SiteGround ).

You may be on their WordPress hosting, which is likely Multisite and hence doesnt allow rewrite rule changes.

If you move to one of their standard hosting plans, you can both have your WP site, install any plugin and also have WP automatically create the rewrite rules.

You can ask them which hosting account will allow you to do that. Any normal Linux hosting account with LAMP stack (linux, apache, mysql, php) would do. They would know.