1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Skip image analysis on ImageMagick error

This commit is contained in:
George Claghorn 2019-05-30 18:20:55 -04:00
parent f0445213d8
commit 165785e8cf

View file

@ -43,6 +43,9 @@ module ActiveStorage
rescue LoadError
logger.info "Skipping image analysis because the mini_magick gem isn't installed"
{}
rescue MiniMagick::Error => error
logger.error "Skipping image analysis due to an ImageMagick error: #{error.message}"
{}
end
def rotated_image?(image)