class Jekyll::SeoTag::ImageDrop

  1. The ‘image.twitter` key
    3. The `image.facebook` key
    2. The `image.path` key if it’s a hash
    1. The ‘image` key if it’s a string
    The image path will be pulled from:
    A drop representing the page image

def absolute_url

def absolute_url
  return unless raw_path
  return @absolute_url if defined? @absolute_url
  @absolute_url = if raw_path.is_a?(String) && absolute_url?(raw_path) == false
                    filters.absolute_url raw_path
                  else
                    raw_path
                  end
end

def filters

def filters
  @filters ||= Jekyll::SeoTag::Filters.new(context)
end

def image_hash

The normalized image hash with a `path` key (which may be nil)
def image_hash
  @image_hash ||= begin
    image_meta = page["image"]
    case image_meta
    when Hash
      { "path" => nil }.merge!(image_meta)
    when String
      { "path" => image_meta }
    else
      { "path" => nil }
    end
  end
end

def initialize(page: nil, context: nil)

context - the Liquid::Context
page - The page hash (e.g., Page#to_liquid)

Initialize a new ImageDrop
def initialize(page: nil, context: nil)
  raise ArgumentError unless page && context
  @mutations = {}
  @page = page
  @context = context
end

def path

Returns nil if no image path can be determined
the escaped, absolute URL representing the page's image
Called path for backwards compatability, this is really
def path
  @path ||= filters.uri_escape(absolute_url) if absolute_url
end

def raw_path

def raw_path
  @raw_path ||= begin
    image_hash["path"] || image_hash["facebook"] || image_hash["twitter"]
  end
end