Karmalakas / grav-plugin-photoswipe

Add Photoswipe gallery to your pages
MIT License
8 stars 1 forks source link

Question about security #17

Closed ventoux84 closed 2 months ago

ventoux84 commented 2 months ago

Hello, I want to protect images with .htaccess and .htpassword. If i put the .htaccess file into the page's directory, full size image are well protected by password; but all thumbnails are displayed anyway.

Do you know a way to protect full images and also thumbnails ? Perhaps by placing the images in an other directory ? But is it possible to indicate a path in {% for item in page.media.images %}

I specify that it is the same behavior using the "login" plugin. And more, the images can be downloaded by direct link.

Karmalakas commented 2 months ago

Sorry, but this is way out of the scope of the plugin. It doesn't care where images are located as long as there are correct thumb and full image paths provided in the template. I believe there was a similar discussion on Grav forum, try searching there maybe

ventoux84 commented 2 months ago

---. It doesn't care where images are located as long as there are correct thumb and full image paths provided in the template.---

How can i provide correct path for a directory different to the page directory in ? {% for item in page.media.images %}

Karmalakas commented 2 months ago

You can put your images pretty much anywhere in the user folder Check the docs

ventoux84 commented 2 months ago

Thanks, it works with {% for item in page.find('/xx').media %} For media in /user/xx/ directory