<%# # Item Partial This partial renders attached items. Attachments of type image, video and audio are emedded. For all other types we try use it's preview. If all else fails we simply link to the attached file. This partial will optionally show a `remove` link next to each attachment which is controlled via a boolean local variable. ## Local variables: - `field`: An instance of [Administrate::Field::Image]. A wrapper around the image url pulled from the database. - `attachment`: Reference to the file - `removable`: A boolean used to control the display of a `Remove` link which is used to destroy a single attachment. Defaults to `false` - `size`: [x, y] Maximum size of the ActiveStorage preview. %> <% if field.show_display_preview? %>
<%= render partial: 'fields/active_storage/normal/preview', locals: local_assigns %>
<% end %>
<%#= link_to attachment.filename, field.blob_url(attachment), title: attachment.filename %>