diff --git a/app/models/alchemy/essence_picture_view.rb b/app/models/alchemy/essence_picture_view.rb index eed72b8306..3103aa0028 100644 --- a/app/models/alchemy/essence_picture_view.rb +++ b/app/models/alchemy/essence_picture_view.rb @@ -44,17 +44,19 @@ def render end end - private - def caption return unless show_caption? @_caption ||= content_tag(:figcaption, essence.caption) end + def src + essence.picture_url(options.except(*DEFAULT_OPTIONS.keys)) + end + def img_tag @_img_tag ||= image_tag( - essence.picture_url(options.except(*DEFAULT_OPTIONS.keys)), { + src, { alt: alt_text, title: essence.title.presence, class: caption ? nil : essence.css_class.presence,