<% if work.representative.present? && (gf = GenericFile.load_instance_from_solr(work.representative)) %> <%= render partial: 'curation_concern/generic_files/media_display', locals: {generic_file: gf, dom_class_name: 'representative_image'} %> <% elsif work.representative.present? %> <%= image_tag download_path(work.representative, {:datastream_id => 'thumbnail'}), class: 'representative_image' %> <% else %> <%= image_tag 'curate/nope.png', class: "canonical-image" %> <% end %>