diff --git a/lib/dpul_collections_web/live/browse_live.ex b/lib/dpul_collections_web/live/browse_live.ex
index 4967bafe..af73b043 100644
--- a/lib/dpul_collections_web/live/browse_live.ex
+++ b/lib/dpul_collections_web/live/browse_live.ex
@@ -37,7 +37,7 @@ defmodule DpulCollectionsWeb.BrowseLive do
<%= gettext("Randomize") %>
-
+
<.browse_item :for={item <- @items} item={item} />
"""
@@ -48,8 +48,16 @@ defmodule DpulCollectionsWeb.BrowseLive do
def browse_item(assigns) do
~H"""
-
- <.thumb :if={@item.page_count} thumb={thumbnail_service_url(@item)} />
+
+ <.thumb :if={@item.page_count} thumb={thumbnail_service_url(@item)} divisor={2} />
+
+ <.thumb
+ :for={{thumb, thumb_num} <- thumbnail_service_urls(4, @item.image_service_urls)}
+ :if={@item.page_count}
+ thumb={thumb}
+ thumb_num={thumb_num}
+ />
+
<.link navigate={@item.url} class="item-link"><%= @item.title %>
@@ -59,10 +67,17 @@ defmodule DpulCollectionsWeb.BrowseLive do
"""
end
+ defp thumbnail_service_urls(max_thumbnails, image_service_urls) do
+ # Truncate image service urls to max value
+ image_service_urls
+ |> Enum.slice(1, max_thumbnails)
+ |> Enum.with_index()
+ end
+
def thumb(assigns) do
~H"""
