diff options
-rw-r--r-- | activestorage/lib/active_storage/analyzer/image_analyzer.rb | 2 | ||||
-rw-r--r-- | activestorage/test/analyzer/image_analyzer_test.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activestorage/lib/active_storage/analyzer/image_analyzer.rb b/activestorage/lib/active_storage/analyzer/image_analyzer.rb index 7342178eff..3b39de91be 100644 --- a/activestorage/lib/active_storage/analyzer/image_analyzer.rb +++ b/activestorage/lib/active_storage/analyzer/image_analyzer.rb @@ -39,7 +39,7 @@ module ActiveStorage end def rotated_image?(image) - %w[ RightTop LeftBottom ].include?(image["orientation"]) + %w[ RightTop LeftBottom ].include?(image["%[orientation]"]) end end end diff --git a/activestorage/test/analyzer/image_analyzer_test.rb b/activestorage/test/analyzer/image_analyzer_test.rb index f04ed63c3c..f8a38f001a 100644 --- a/activestorage/test/analyzer/image_analyzer_test.rb +++ b/activestorage/test/analyzer/image_analyzer_test.rb @@ -18,8 +18,8 @@ class ActiveStorage::Analyzer::ImageAnalyzerTest < ActiveSupport::TestCase blob = create_file_blob(filename: "racecar_rotated.jpg", content_type: "image/jpeg") metadata = extract_metadata_from(blob) - assert_equal 4104, metadata[:width] - assert_equal 2736, metadata[:height] + assert_equal 2736, metadata[:width] + assert_equal 4104, metadata[:height] end test "analyzing an SVG image without an XML declaration" do |