Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to fix it to appear (image) is rotated uploaded photos in CarrierWave
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