mirror of
https://github.com/moebooru/moebooru
synced 2025-08-22 01:47:48 +00:00
branch : moe extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%405
16 lines
433 B
Ruby
16 lines
433 B
Ruby
module InlineHelper
|
|
def inline_image_tag(image, options = {}, tag_options = {})
|
|
if options[:use_sample] and image.has_sample?
|
|
url = image.sample_url
|
|
tag_options[:width] = image.sample_width
|
|
tag_options[:height] = image.sample_height
|
|
else
|
|
url = image.file_url
|
|
tag_options[:width] = image.width
|
|
tag_options[:height] = image.height
|
|
end
|
|
|
|
return image_tag(url, tag_options)
|
|
end
|
|
end
|