how to use mini_magick to delete exif?

323 views Asked by At

you can show all the exif of a image in mini_magick, like this:

image = MiniMagick::Image.open('example.jpg')
pp image.exif

but I can't delete the exif, like image.exif={}, it shows the error:

mogrify: unrecognized option `-exif=' @ error/mogrify.c/MogrifyImageCommand/4833.

so, how can I delete all the exif information of a image use mini_magick?

1

There are 1 answers

0
dayudodo On

well, finally, I found a solution: use mogrify, batch process all the images

mogrify -strip -quality 75%  *.jpg

the argument strip delete all the exif information, set the quality to 75%!