Announcement

  •  » Requests
  •  » Hiding metadata (date, location) to non-registered users

#1 2014-08-19 14:36:35

mmoy
Member
France
2014-08-18
85

Hiding metadata (date, location) to non-registered users

Hello/Hi/Greetings,

I'm looking for a way to display some metadata like date and location for pictures which have it set only to registered users. Rationale: registered users are here to share a piece of my private life, they may want to remember when such or such event occurred, so the "date" field (Image Created exif tag) is relevant for them. OTOH, unregistered users are here just to view a few nice images, the "date" field does not bring them much, but it leaks a piece of my private life in public (which date and at what time did I do such or such thing, and if the image contains GPS coordinate, it even say precisely where I was at what time).

Ideally, the .jpg images served to unregistered users should have these fields removed, but I understand this has a lot of implications implementation-wise.

Just hiding the creation date from the HTML generated by Piwigo would be a good first step, and should integrate easily with Piwigo's permission system, just like we can already hide the number of views and number of comments from the "User" section of the administration interface.

Thanks,

Piwigo URL: http://mmoy.piwigo.com

Offline

 

#2 2014-08-19 15:05:18

flop25
Piwigo Team
2006-07-06
7037

Re: Hiding metadata (date, location) to non-registered users

Hello
rework the template picture.tpl to hide info: might need a custom plugin to check if is_guest or not
use the original protection local config and disable the HD properties for gest, because I remember that resized pictures haven't the metadata


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2014-08-19 15:16:17

mmoy
Member
France
2014-08-18
85

Re: Hiding metadata (date, location) to non-registered users

Thanks for your quick answer.

Reworking the template isn't an option for me since I'm currently hosted on piwigo.com (or do I have a way to edit the *.tpl there?).

Indeed, the resized images do not have the metadata in EXIF format, but they still leak a date (the upload date I guess) in the "Last-Modified:" HTTP header.

Offline

 

#4 2014-08-19 15:22:31

flop25
Piwigo Team
2006-07-06
7037

Re: Hiding metadata (date, location) to non-registered users

well that's how internet is made, we can't do so much about it


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2014-08-19 15:40:14

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Hiding metadata (date, location) to non-registered users

I only partially understand your request. For Piwigo, metadata are data found inside the photo. Some of them can fill Piwigo photo properties (title, description, author, creation date, tags).

With a custom plugin, we could have something like:

Code:

if (is_guest())
{
  // dynamic modification on $conf['picture_informations']
}

I can add such a plugin on your Piwigo (and give the code on http://piwigo.org/doc/doku.php?id=dev:c … al_plugins )

Offline

 

#6 2014-08-19 15:43:13

mmoy
Member
France
2014-08-18
85

Re: Hiding metadata (date, location) to non-registered users

Humm, actually, it's a bit more complex than that. The thumbnails do not have EXIF data, but the medium and large images do (I had tested this previously, you gave me a doubt so I rechecked, but with different sizes), which is essentially a good thing (for visitors downloading large but not full resolution, they'll be happy to have the EXIF data).

Thanks,

Offline

 

#7 2014-08-19 15:45:17

flop25
Piwigo Team
2006-07-06
7037

Re: Hiding metadata (date, location) to non-registered users

plg wrote:

With a custom plugin, we could have something like:

Code:

if (is_guest())
{
  // dynamic modification on $conf['picture_informations']
}

oh yeah That's a better way to do it too

But exif will still be in medium etc... hmm about that I don't see a solution


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#8 2014-08-19 15:48:24

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Hiding metadata (date, location) to non-registered users

Metadata are removed from multiple size with this advanced configuration setting:

Code:

// below which size (in pixels, ie width*height) do we remove metadata
// EXIF/IPTC... from derivative?
$conf['derivatives_strip_metadata_threshold'] = 256000;

(derivative = resized photo)

We can easily increase this value and never have any EXIF/IPTC in derivative.

Offline

 

#9 2014-08-19 15:49:48

flop25
Piwigo Team
2006-07-06
7037

Re: Hiding metadata (date, location) to non-registered users

so much config var, so wonderfull :)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2014-08-19 15:50:52

mmoy
Member
France
2014-08-18
85

Re: Hiding metadata (date, location) to non-registered users

plg wrote:

With a custom plugin, we could have something like:

Code:

if (is_guest())
{
  // dynamic modification on $conf['picture_informations']
}

I can add such a plugin on your Piwigo (and give the code on http://piwigo.org/doc/doku.php?id=dev:c … al_plugins )

That would do it, yes. I was hopping other users could benefit from this too, but I have no idea how many of them would have the same wish.

Offline

 

#11 2014-08-19 15:56:53

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Hiding metadata (date, location) to non-registered users

mmoy, I understand that you want to hide "Created on" photo property, but what about "location"? there is no such photo property. This is why I wonder if you're talking about photo properties or EXIF/IPTC metadata :-/

Offline

 

#12 2014-08-19 16:14:33

mmoy
Member
France
2014-08-18
85

Re: Hiding metadata (date, location) to non-registered users

plg wrote:

mmoy, I understand that you want to hide "Created on" photo property, but what about "location"? there is no such photo property. This is why I wonder if you're talking about photo properties or EXIF/IPTC metadata :-/

In general, I'm talking about the information available to the visitor. The location is not displayed in Piwigo's web interface but is contained in the picture (Latitude, Longitude).

As I said in my first message, ideally we would leak no information at all, but not showing the information in the web interface is already good (and then I agree that this is only about the Image Created field).

Offline

 

#13 2014-08-19 16:32:31

mmoy
Member
France
2014-08-18
85

Re: Hiding metadata (date, location) to non-registered users

I should have mentioned: I don't actually care personally about the location much, as 99,99% of my photos do not have it. I was mentioning it for completeness, since I think a privacy-paranoid setup should take care of this field too.

Offline

 
  •  » Requests
  •  » Hiding metadata (date, location) to non-registered users

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact