class Asciidoctor::DocBook45::BlockImageTemplate

def template

def template
  @template ||= @eruby.new <<-EOF
#encoding:UTF-8%><%#encoding:UTF-8%><figure#{id}#{role}#{xreflabel}>
#{title}
<mediaobject>
  <imageobject>
    <imagedata fileref="<%= image_uri(attr :target) %>"#{attribute('contentwidth', :width)}#{attribute('contentdepth', :height)}/>
  </imageobject>
  <textobject><phrase><%= attr :alt %></phrase></textobject>
</mediaobject>
figure>
  EOF
end