8

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" }
}
atitan
  • 123
  • 5

1 Answers1

6

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?)

Community
  • 1
  • 1
roman-roman
  • 2,746
  • 19
  • 27
  • Assigning blank string to "original-no-exif" makes paperclip create a same size image, but the syntax is weird. Is there any alternatives? – atitan May 21 '14 at 14:43
  • I don't thinks so. Maybe you can even create "original" style, like pointed here: http://stackoverflow.com/questions/3219787/how-do-i-tell-paperclip-to-not-save-the-original-file – roman-roman May 22 '14 at 07:25