module Shrine::Plugins::StoreDimensions::InstanceMethods

  1. lib/shrine/plugins/store_dimensions.rb

Methods

Public Instance

  1. extract_metadata

Public Instance methods

extract_metadata(io, **options)
[show source]
   # File lib/shrine/plugins/store_dimensions.rb
74 def extract_metadata(io, **options)
75   return super unless opts[:store_dimensions][:auto_extraction]
76 
77   # We update the metadata with "width" and "height".
78   width, height = self.class.extract_dimensions(io)
79 
80   super.merge!("width" => width, "height" => height)
81 end