fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
488 stars 301 forks source link

Watermarks #4522

Open HRN65 opened 2 years ago

HRN65 commented 2 years ago

It appairs Media objects in HTML block and Stories are now stored in browser cache, resulting in a mix of watermark protected and non protected images when logged in. Quite annoying seeing watermarks on images of (bad) hand writing when logged in.

fisharebest commented 2 years ago

The URL for the thumbnail image contains a parameter mark=0 or mark=1. For example,

https://dev.webtrees.net/demo-dev/tree/demo/media-thumbnail?xref=m1&fact_id=a11b92ed7e364dae58b1870a1c2818e4&w=400&h=520&fit=crop&mark=1&s=62f7cac0a5dea08bdd39aa57586bbe3c

https://dev.webtrees.net/demo-dev/tree/demo/media-thumbnail?xref=m1&fact_id=a11b92ed7e364dae58b1870a1c2818e4&w=400&h=520&fit=crop&mark=0&s=3856eedddba0d5e8967794d592aa9a2b

(The server will check whether you have permission to view the image without the watermark, and you'll get a 403 response if you do not. In this case, the image is public.)

My guess is that you created the image in the HTML block by copying a URL, and that your URLs contain a mix of mark=0 and mark=1.

HRN65 commented 2 years ago

mark=1 or mark=0 seems to make no difference. If I visit my site not logged in (cache cleared) all images are watermarked. Then logging in, the images in HTML block and Stories are still watermarked. I now have to clear cache and reload page to see images without watermarks. Logging out, the images in HTML block and Stories now do not have watermarks. I again have to clear cache.

fisharebest commented 2 years ago

mark=1 or mark=0 seems to make no difference.

You are saying that you can see an image with mark=1 in the URL both with and without a watermark, or an image withmark=0 in the URL both with and without a watermark?

HRN65 commented 2 years ago

Both mark=0 and mark=1 can be seen with and without watermark. Initial image is stored in browser, and I have to clear cache after logging in/out. You can see this in HTML block here https://visitusinmaputo.com/webtree/tree/familie (now mark=0) You still have a user account