Skip to content

Commit 4b3b0e8

Browse files
committed
Use proxy url for image block image tags
1 parent 3db3d9f commit 4b3b0e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/views/better_together/content/blocks/_image.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<%= render layout: 'better_together/content/blocks/block', locals: { block: image } do %>
22
<%= cache image.cache_key_with_version do %>
33
<% if image.caption.present? || image.attribution.present? %>
4-
<figure class="figure text-center w-100"> <!-- Added text-center to center the content -->
5-
<%= image_tag image.url, class: 'figure-img img-fluid d-block mx-auto', alt: image.alt_text %>
4+
<figure class="figure text-center w-100">
5+
<%= image_tag rails_storage_proxy_url(image), class: 'figure-img img-fluid d-block mx-auto', alt: image.alt_text %>
66

77
<figcaption class="figure-caption text-center">
88
<% if image.caption.present? %>
@@ -25,7 +25,7 @@
2525
</figcaption>
2626
</figure>
2727
<% else %>
28-
<%= image_tag image.url, class: 'img-fluid d-block mx-auto', alt: image.alt_text %> <!-- Ensured the image is centered -->
28+
<%= image_tag rails_storage_proxy_url(image), class: 'img-fluid d-block mx-auto', alt: image.alt_text %>
2929
<% end %>
3030
<% end %>
3131
<% end %>

0 commit comments

Comments
 (0)