简体   繁体   English

回形针 - 错误的图像方向

[英]Paperclip - Wrong image orientation

I'm using Paperclip 4.1.1 for images uploading. 我正在使用Paperclip 4.1.1进行图像上传。 I store three sizes, original, medium and thumbnail. 我存储三种尺寸,原始,中等和缩略图。 When I try to show the original images, some of them appear rotated to the left, and it happens randomly, because some others are displayed correctly. 当我尝试显示原始图像时,其中一些显示为向左旋转,并且它随机发生,因为其他一些图像正确显示。 This does not happen with medium and thumbnail sizes. 中等和缩略图大小不会发生这种情况。 The funny fact is that if I open any original image url on a browser, it always displays correctly. 有趣的是,如果我在浏览器上打开任何原始图像网址,它始终会正确显示。 Any thoughts? 有什么想法吗?

EDIT: 编辑:

According to this comment in the Paperclip Railscast , this behavior doesn't occur on processed images. 根据Paperclip Railscast中的此注释,处理后的图像不会发生此行为。 As a workaround, I added a new Paperclip style big enough to meet my requirements. 作为一种解决方法,我添加了一个足以满足我要求的新Paperclip样式。

Check this How to set Paperclip to process original image? 检查此如何设置回形针以处理原始图像? this will help. 这会有所帮助。 Adding original: {convert_options: '-strip'} in styles help 在样式帮助中添加原始:{convert_options:' - strip'}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM