Created
November 24, 2013 16:56
-
-
Save hoshinaoshi/7629389 to your computer and use it in GitHub Desktop.
How to fix it to appear (image) is rotated uploaded photos in CarrierWave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImageUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
process :fix_exif_rotation | |
def fix_exif_rotation | |
manipulate! do |img| | |
img.auto_orient! | |
img = yield(img) if block_given? | |
img | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment