我有一个帖子模型,其中包含三种样式(拇指、小、原始)的图像。
我想从回形针创建的每个图像中删除exif,所以我在convert_options中使用了“-strip”,但后来发现exif仍然以原始样式存在。
我能做些什么来删除它?
has_attached_file :image, {
styles: { thumb: ["250x250>", :jpg], small: ["125x125>", :jpg] },
convert_options: { all: "-quality 80 -interlace Plane -strip" }
}
最佳答案
无论如何,原始样式将始终包含原始图像。
你可以做的是创建一个额外的样式,比如 original-no-exif
,然后删除真正的原始图像(您可以这样做: Rails and Paperclip... don't save the original image, just the styles? )
关于ruby-on-rails - 从使用回形针上传的原始图像中删除 exif,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23785892/