app/views/madmin/fields/attachment/_show.html.erb in madmin-1.2.0 vs app/views/madmin/fields/attachment/_show.html.erb in madmin-1.2.1

- old
+ new

@@ -1,3 +1,9 @@ <% if (attachment = field.value(record)) && attachment.attached? %> - <%= link_to attachment.filename, attachment, target: :_blank %> + <% if attachment.variable? %> + <%= link_to attachment, target: :_blank do %> + <%= image_tag attachment, class: "max-h-32" %> + <% end %> + <% else %> + <%= link_to attachment.filename, attachment, target: :_blank, class: "text-indigo-500 underline" %> + <% end %> <% end %>