Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove exif from original image uploaded using paperclip

I have a post model which contains a image in three styles(thumb, small, original).

I want to remove the exif from every image created by paperclip, so I use "-strip" in the convert_options, but later found the exif still exists in the original style.

What can I do to remove it?

has_attached_file :image, {
  styles: { thumb: ["250x250>", :jpg], small: ["125x125>", :jpg] },
  convert_options: { all: "-quality 80 -interlace Plane -strip" }
}
like image 843
atitan Avatar asked May 21 '14 14:05

atitan


1 Answers

original style will always contain original image, no matter what. What you can do is to create an additional style, like original-no-exif, and then remove the real original image (you can do it this way: Rails and Paperclip... don't save the original image, just the styles?)

like image 163
roman-roman Avatar answered Oct 17 '22 19:10

roman-roman