<% if block_options[:thumbnail_image_url].present? %>
<%= link_to_document(document, image_tag(block_options[:thumbnail_image_url], class: 'img-thumbnail', alt: doc_presenter.heading), counter: -1) %>
<% elsif block_options[:iiif_tilesource_base].present? %>
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!400,400/0/default.jpg', class: 'img-thumbnail', alt: doc_presenter.heading), counter: -1) %>
<% elsif has_thumbnail? document %>
<%= render_thumbnail_tag(document, { class: 'img-thumbnail', alt: doc_presenter.heading }, document_counter: -1) %>
<% end %>
<% if solr_documents_block.primary_caption? %>
<%= doc_presenter.field_value(blacklight_config.index_fields[solr_documents_block.primary_caption_field] || Blacklight::Configuration::NullField.new(solr_documents_block.primary_caption_field)) %>
<% end %>
<% if solr_documents_block.secondary_caption? %>
<%= doc_presenter.field_value(blacklight_config.index_fields[solr_documents_block.secondary_caption_field] || Blacklight::Configuration::NullField.new(solr_documents_block.secondary_caption_field)) %>
<% end %>
<% if solr_documents_block.zpr_link? && block_options[:iiif_tilesource].present? %>
<% end %>