Skip to content

ExiftoolNotInstalled error when trying to remove EXIF data #28

Description

@kiskoza

Hi. I'm trying to remove some sensitive information (e.g.: GPS location) from uploaded files using exiftool.

When I try to check the existing EXIF data, it works:

Exiftool.new(file_path, '-ignoreMinorErrors').to_hash
# {
#   "source_file": "image_with_gps.jpg",
#   "exif_tool_version": 11.88,
#   "file_name": "image_with_gps.jpg",
#   "file_size": "6.0 MB",
#   ...
# }

However, as soon as I try to change something in the file it starts complaining that exiftool is not installed

Exiftool.new(file_path, '-ignoreMinorErrors -gps:all= "-gps*=" -tagsfromfile @ -Orientation')
# Exiftool::ExiftoolNotInstalled raised

The problem seems to be with the lines checking that the result of the exiftool command is an empty string: lib/exiftool.rb#L58-L60.

  1. Is this gem meant to be used for manipulating EXIF data? If no, is there one that you can recommend?
  2. Is there any additional exiftool option I need to add to keep my command compatible with this gem?

I would help creating a PR to make my use-case viable if you're interested in it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions