refactor: use preview image for featured arts
Some checks are pending
Docker / docker (push) Waiting to run
Some checks are pending
Docker / docker (push) Waiting to run
- Use `preview_image(:large).processed` instead of `image` for displaying featured arts. This change improves the performance of the homepage by displaying a processed preview image instead of the original, potentially large, image. This reduces the initial load time and improves user experience.
This commit is contained in:
parent
50183539f5
commit
c808b72c63
@ -3,7 +3,7 @@
|
||||
<section class="h-screen-90 relative overflow-hidden">
|
||||
<% if @featured_arts.first&.image&.attached? %>
|
||||
<div class="absolute inset-0">
|
||||
<%= image_tag @featured_arts.first.image, class: "w-full h-full object-cover" %>
|
||||
<%= image_tag @featured_arts.first.preview_image(:large).processed, class: "w-full h-full object-cover" %>
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-base-100/90 to-base-100/50"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
Loading…
Reference in New Issue
Block a user