Module: Onebox::Engine::OpengraphImage

Included in:
FlickrOnebox, FlickrShortenedOnebox
Defined in:
lib/onebox/engine/opengraph_image.rb

Instance Method Summary collapse

Instance Method Details

#to_htmlObject


5
6
7
8
9
# File 'lib/onebox/engine/opengraph_image.rb', line 5

def to_html
  og = get_opengraph
  escaped_src = ::Onebox::Helpers.normalize_url_for_output(og[:image])
  "<img src='#{escaped_src}' width='#{og[:image_width]}' height='#{og[:image_height]}' #{Helpers.title_attr(og)}>"
end