Store image hashes in the db - part 1
This commit is contained in:
@@ -25,7 +25,11 @@
|
||||
>
|
||||
<:col :let={{_id, record}} label="Image">
|
||||
<span class="relative inline-block drop-shadow-xl">
|
||||
<img class="max-w-16 rounded-lg" src={~p"/images/#{record.id}"} alt={record.title} />
|
||||
<img
|
||||
class="max-w-16 rounded-lg"
|
||||
alt={record.title}
|
||||
src={~p"/images/#{record.id}?vsn=#{record.image_data_hash || ""}"}
|
||||
/>
|
||||
<span class="absolute right-1 bottom-0 block text-white drop-shadow-md">
|
||||
<%= Records.Record.format_short_label(record.format) %>
|
||||
</span>
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
|
||||
<div class="md:columns-2">
|
||||
<span class="relative block md:inline-block drop-shadow">
|
||||
<img class="w-full" src={~p"/images/#{@record.id}"} alt={@record.title} />
|
||||
<img
|
||||
class="w-full"
|
||||
src={~p"/images/#{@record.id}?vsn=#{@record.image_data_hash}"}
|
||||
alt={@record.title}
|
||||
/>
|
||||
<span class="absolute right-2 bottom-1 block text-white drop-shadow-md">
|
||||
<%= Records.Record.format_short_label(@record.format) %>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user