= block_with_caption :bottom, {:class=>'imageblock', :style=>style_value(text_align: (attr :align), float: (attr :float))}
  = html_tag_if (attr? :link), :a, {:class=>'image', :href=>(attr :link)}
    img src=image_uri(attr :target) alt=(attr :alt) width=(attr :width) height=(attr :height)

= block_with_caption :bottom, {:class=>'imageblock', :style=>style_value(text_align: (attr :align), float: (attr :float))}
  = html_tag_if (attr? :link), :a, {:class=>'image', :href=>(attr :link), :target=>(attr :window), :rel=>link_rel}
    img src=image_uri(attr :target) alt=(attr :alt) width=(attr :width) height=(attr :height)

Add support for the window option for a link to block image
Add support for the window option for a link to block image

Ported from https://github.com/asciidoctor/asciidoctor/commit/faf21302a97b2c1c3d8a896be565c4ec02a03b98

jirutka/asciidoctor-html5,jirutka/asciidoctor-html5