diff --git a/app/views/active_storage/blobs/web/_representation.html.erb b/app/views/active_storage/blobs/web/_representation.html.erb index b8247e376..9d6de0f63 100644 --- a/app/views/active_storage/blobs/web/_representation.html.erb +++ b/app/views/active_storage/blobs/web/_representation.html.erb @@ -14,8 +14,10 @@ -<% elsif blob.variable? || blob.previewable? %> +<% elsif blob.variable? %> <%= image_tag url_for(blob.variant(variant)), width: width, height: height %> +<% elsif blob.previewable? %> + <%= image_tag url_for(blob.preview(variant)), width: width, height: height %> <% else %> <%= blob.filename.extension&.downcase.presence || "unknown" %> <% end %>