Skip to content

Commit

Permalink
Variant: Use resize_to_fit, to preserve aspect ratio.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Oct 25, 2023
1 parent 2db5e9e commit c71e9a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/catalog/_index_mapview_default.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class='media'>
<%- if document.sidecar.image.attached? %>
<%- if document.sidecar.image.variable? %>
<%= image_tag document.sidecar.image.variant(resize_to_fill: [200, nil]), {class: 'mr-3', alt: document.to_semantic_values[:title]} %>
<%= image_tag document.sidecar.image.variant(resize_to_fit: [200, nil]), {class: 'mr-3', alt: document.to_semantic_values[:title]} %>
<%- else %>
<%= image_tag document.sidecar.image, {class: 'mr-3'} %>
<%- end %>
Expand Down

0 comments on commit c71e9a1

Please sign in to comment.