Search…

X3 Photo Gallery Support Forums

Search…
 
rp
Experienced
Topic Author
Posts: 31
Joined: 28 Sep 2006, 15:58

Remove Image MetaData

20 Feb 2021, 09:29

Hello

I miss very much the option to remove the MetaData from the uploaded images.

Please consider it a feature request  :slight_smile:

In the meantime, is there a tweak in the code of php image processing to remove exif data on resize?

Thank you!
Romeo
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12813
Joined: 30 Sep 2006, 03:37

Re: Remove Image MetaData

20 Feb 2021, 11:00

May I ask exactly for what reason you explicitly need to "remove" the meta data on upload? Can't you just choose to not display the meta data?
rp wrote:In the meantime, is there a tweak in the code of php image processing to remove exif data on resize?
When X3 PHP creates RESIZED versions of your images, EXIF data is always removed from the downsized versions. However, when you upload from the X3 panel with "resize" selected, the resize is in fact done by the browser, and there is currently no option to remove exif on this process.

If you really need to remove EXIF on/before upload, you could resize images on your desktop BEFORE upload. There are several apps on both Mac and Windows that allow resizing and compression, a few noted in my post here:
https://www.photo.gallery/blog/image-si ... -websites/
 
rp
Experienced
Topic Author
Posts: 31
Joined: 28 Sep 2006, 15:58

Re: Remove Image MetaData

20 Feb 2021, 12:40

mjau-mjau wrote: May I ask exactly for what reason you explicitly need to "remove" the meta data on upload? Can't you just choose to not display the meta data?
I have a photo gallery where I frequently upload and update photos without editing and directly out of the phone. For privacy reasons I need to remove GPS coordinates from the files there.
mjau-mjau wrote: When X3 PHP creates RESIZED versions of your images, EXIF data is always removed from the downsized versions. However, when you upload from the X3 panel with "resize" selected, the resize is in fact done by the browser, and there is currently no option to remove exif on this process.
Thanks for clarification, that's what confused me. The browser based resizer is called UPLOAD RESIZER in the panel settings then and IMAGE RESIZER  under "Various global settings" is for the resized versions, right?
mjau-mjau wrote: If you really need to remove EXIF on/before upload, you could resize images on your desktop BEFORE upload. There are several apps on both Mac and Windows that allow resizing and compression, a few noted in my post here:
https://www.photo.gallery/blog/image-si ... -websites/
For professional gallery this is the solution as all the photos are edited anyway and I understand this are the main users here. But from nowadays phones and compact cameras the images are already processed and web-ready in many cases. It would just simplify the workflow if the pictures could be uploaded right out of the phone.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12813
Joined: 30 Sep 2006, 03:37

Re: Remove Image MetaData

20 Feb 2021, 23:03

rp wrote:I have a photo gallery where I frequently upload and update photos without editing and directly out of the phone. For privacy reasons I need to remove GPS coordinates from the files there.
Makes sense. What OS are you using? There are several desktop apps that could strip all meta data (also with optimizing) before uploading. Personally, I use imageOptim (for Mac).
rp wrote:Thanks for clarification, that's what confused me. The browser based resizer is called UPLOAD RESIZER in the panel settings then and IMAGE RESIZER  under "[/size]Various global settings" is for the resized versions, right?
Yes, this could be confusing. There is Settings > Advanced > Image resizer, which affects resizing (downsizing) of images for various gallery layouts, but does NOT affect the uploaded image. There there is Settings > Panel > Uploader, which strictly adffects the upload with options to resize on upload.
rp wrote:For professional gallery this is the solution as all the photos are edited anyway and I understand this are the main users here. But from nowadays phones and compact cameras the images are already processed and web-ready in many cases. It would just simplify the workflow if the pictures could be uploaded right out of the phone.
There could perhaps be an option "keep meta data", although I see one problem: Many cameras also store the image rotation value in EXIF, especially photos from mobile devices. If we strip this data, images may display incorrectly rotated. I would need to do some tests, and see if we can rotate the image on upload before stripping the data. Also, if you don't select "resize" option in the uploader (for example if you want to keep original size), X3 would not do anything with the original image.
 
rp
Experienced
Topic Author
Posts: 31
Joined: 28 Sep 2006, 15:58

Re: Remove Image MetaData

21 Feb 2021, 10:05

mjau-mjau wrote: Makes sense. What OS are you using? There are several desktop apps that could strip all meta data (also with optimizing) before uploading. Personally, I use imageOptim (for Mac).
Windows has it built in (right click on file -> Properties -> Details Tab-> remove personal information) it works with batch of files too but not very reliable. If the images are originating from different cameras with different sets of EXIF data then it often fails completely. I now use Irfan View for resizing and removing meta data.
mjau-mjau wrote: There could perhaps be an option "keep meta data", although I see one problem: Many cameras also store the image rotation value in EXIF, especially photos from mobile devices. If we strip this data, images may display incorrectly rotated. I would need to do some tests, and see if we can rotate the image on upload before stripping the data. Also, if you don't select "resize" option in the uploader (for example if you want to keep original size), X3 would not do anything with the original image.
For me best solution would be to always upload the full size Image and process it on the server. It could be rotated correctly, then resized with optimal quality and the option to have the EXIF data copied to the new image or not. After processing the original file, it can be deleted from server or even better if there was an option to move the untouched file to a protected folder/archive instead.
just found your new files app and saw that it has batch processing and meta data editing planned. So maybe you could make it a plugin to have these functionalities available in x3? It would be awesome for simple galleries / projects to not rely on any other software than x3. While Professional Photographers still can upload the images directly and skip any server side processing for having full control (expect the automatic downsized versions in gallery view of course).

My thoughts and wishes for future releases of 3x, what do you think?

Thank you for your time Karl!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12813
Joined: 30 Sep 2006, 03:37

Re: Remove Image MetaData

21 Feb 2021, 12:09

rp wrote:For me best solution would be to always upload the full size Image and process it on the server. It could be rotated correctly, then resized with optimal quality and the option to have the EXIF data copied to the new image or not. After processing the original file, it can be deleted from server or even better if there was an option to move the untouched file to a protected folder/archive instead.
I see how that could be an interesting option. The current issue here, is that users may upload original images at 5000 px, and then assume their server is capable of resizing images this large. With normal PHP (GD) resizing, this would most often cause a memory_limit error, and only succeed on servers that have at least 128 MB (preferably 256) ... In 2021, most "good" hosting servers probably offer 128MB (or higher) so it could be possible, but it would definitely be a challenge. More feasible however, is that we would require imageMagick (as discussed in this topic), which is capable of resizing images without exceeding PHP memory limits. For now, this is just concepts, but could be a direction for a future X3 version.
rp wrote:just found your new files app and saw that it has batch processing and meta data editing planned. So maybe you could make it a plugin to have these functionalities available in x3? It would be awesome for simple galleries / projects to not rely on any other software than x3. While Professional Photographers still can upload the images directly and skip any server side processing for having full control (expect the automatic downsized versions in gallery view of course).
Heard!

X3 already edits IPTC meta data when you save title/description, although there has been issues with this. It may be possible to edit EXIF data also, but it does require some special libraries that edit images on byte-level. Personally, it feels a bit dodgy, and I would prefer to avoid this strictly for a "photo gallery". Sever-based PHP is simply inferior to desktop apps in terms of editing images. Might be better options with imageMagick ... Thanks for now!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12813
Joined: 30 Sep 2006, 03:37

Re: Remove Image MetaData

27 Feb 2021, 03:31

I have now added an option to "remove image meta data" on upload. See X3.30.1 release post:
viewtopic.php?f=51&t=10184

Disabled by default, the option is available from Settings > Panel > Uploader. Once enabled, you will find a new checkbox "Remove meta" in your uploader, which allows you to keep or remove image meta data on upload.


When checked, ALL image meta data will be removed, including IPTC, EXIF and GPS coordinates. Only use this feature if you are sure you don't need any of the image meta data for display reasons.
* Meta data will only get removed from images that get resized.
 
rp
Experienced
Topic Author
Posts: 31
Joined: 28 Sep 2006, 15:58

Re: Remove Image MetaData

27 Feb 2021, 05:59

Perfect! This is going to make my workflow so much easier. Thank you Karl !!
 
rp
Experienced
Topic Author
Posts: 31
Joined: 28 Sep 2006, 15:58

Re: Remove Image MetaData

03 Mar 2021, 11:48

I am a bit late with my reply and in the meantime it seems off topic abit. However I wanted to add my thoughts about ImageMagick and Server Resources mentioned by you earlier:
mjau-mjau wrote: I see how that could be an interesting option. The current issue here, is that users may upload original images at 5000 px, and then assume their server is capable of resizing images this large. With normal PHP (GD) resizing, this would most often cause a memory_limit error, and only succeed on servers that have at least 128 MB (preferably 256) ... In 2021, most "good" hosting servers probably offer 128MB (or higher) so it could be possible, but it would definitely be a challenge. More feasible however, is that we would require imageMagick (as discussed in this topic), which is capable of resizing images without exceeding PHP memory limits. For now, this is just concepts, but could be a direction for a future X3 version.
In my opinion the area of shared hosting is ending. Cloud hosting became so affordable and is easy to setup that most people with the technical skills to setup a website in a shared hosting account also have the skills to run a cloud server. Cloud hosting gives all the flexibility for configuration. Missing packages such as ImageMagick or lack of resources are not an issue anymore. The other users who can't or not want to maintain a server themselves, will use SaaS, like your Flamepix.

I understand there is a trade off between functionality and simplicity and the two major points that make X3 unique is that it "looks great" and "just runs". So you could put all these extra features that require ImageMagick or more Memory in a separate plugin. You could make that plugin also paid, as it replaces the need for desktop application in many cases. It might also target other potential users who are not professional photographers but want a self hosted CRM with more possibilities.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12813
Joined: 30 Sep 2006, 03:37

Re: Remove Image MetaData

04 Mar 2021, 00:51

rp wrote:In my opinion the area of shared hosting is ending. Cloud hosting became so affordable and is easy to setup that most people with the technical skills to setup a website in a shared hosting account also have the skills to run a cloud server. Cloud hosting gives all the flexibility for configuration. Missing packages such as ImageMagick or lack of resources are not an issue anymore. The other users who can't or not want to maintain a server themselves, will use SaaS, like your Flamepix.
I agree with using ImageMagick, as this is probably available even on many shared hosting these days with a simple checkbox from control panel. While "cloud hosting" is certainly the way to go if you are technically comfortable, it's far from mainstream for the masses (including X3 users). The majority will deal with FTP, email, but they don't want to deal with "code" or ssh, apache, ubuntu, terminal and the possibility that something "breaks". As for Flamepix, it's simply too expensive for most users who are on a budget. For a one-time purchase app like X3, there simply isn't volume to support business if we only rely on technically adept users that run their own servers. Assuming this has something to do with Koken discontinued also. I'm sure there is a way to satisfy all requirements.
rp wrote:I understand there is a trade off between functionality and simplicity and the two major points that make X3 unique is that it "looks great" and "just runs". So you could put all these extra features that require ImageMagick or more Memory in a separate plugin. You could make that plugin also paid, as it replaces the need for desktop application in many cases. It might also target other potential users who are not professional photographers but want a self hosted CRM with more possibilities.
The main reason we haven't used ImageMagick yet, is mainly because there hasn't been much need for it to be honest. The built-in PHP GD does resizing of same quality as ImageMagick, and with memory_limits climbing past 128MB, it's not really a memory issue either. Of course, for those pro photographers who take great pride in their photography (as they should), they require customization levels like "sharpening" (as in this post). Apart from "sharpening", I really haven't come across other requirements for ImageMagick.

As for upload full size image, this is something I wanted to avoid for logical reasons. Imagine uploading 100 x 5MB images, that's 500 MB to upload, and the host will need to provide the space also (at least temporarily). With the resizing happening on upload (from browser), total upload size will be more like 30 MB, which is a huge difference in time spent. And the end result is the same resized images.

Appreciate the feedback of course! Just thinking aloud. No reason we can't use ImageMagick in the future, but I am conserned about changing the approach to uploading originals online (security, storage-space, time-consuming), if the benefit is minimal.