Skip to content

Commit

Permalink
autorotate uploaded image (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
doerfli committed Jun 30, 2024
1 parent cf3f462 commit fcb6edc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/recipe_images_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def create
# convert jpeg to webp using vips
tmpfile = Tempfile.new('img', :encoding => 'ascii-8bit')
im = Vips::Image.new_from_buffer image.read, ""
im = im.autorot
tmpfile.write(im.webpsave_buffer(Q: 60))
tmpfile.close

Expand Down

0 comments on commit fcb6edc

Please sign in to comment.