module Shrine::Plugins::StoreDimensions::InstanceMethods

Public Instance Methods

extract_metadata(io, **options) click to toggle source
Calls superclass method
# File lib/shrine/plugins/store_dimensions.rb, line 74
def extract_metadata(io, **options)
  return super unless opts[:store_dimensions][:auto_extraction]

  # We update the metadata with "width" and "height".
  width, height = self.class.extract_dimensions(io)

  super.merge!("width" => width, "height" => height)
end