diff --git a/bskyweb/cmd/bskyweb/server.go b/bskyweb/cmd/bskyweb/server.go
index b0fde255..7a3b8bf1 100644
--- a/bskyweb/cmd/bskyweb/server.go
+++ b/bskyweb/cmd/bskyweb/server.go
@@ -336,7 +336,11 @@ func (srv *Server) WebPost(c echo.Context) error {
data["postView"] = postView
data["requestURI"] = fmt.Sprintf("https://%s%s", req.Host, req.URL.Path)
if postView.Embed != nil && postView.Embed.EmbedImages_View != nil {
- data["imgThumbUrl"] = postView.Embed.EmbedImages_View.Images[0].Thumb
+ var thumbUrls []string
+ for i := range postView.Embed.EmbedImages_View.Images {
+ thumbUrls = append(thumbUrls, postView.Embed.EmbedImages_View.Images[i].Thumb)
+ }
+ data["imgThumbUrls"] = thumbUrls
}
return c.Render(http.StatusOK, "post.html", data)
}
diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html
index 55a0679f..307f80bb 100644
--- a/bskyweb/templates/post.html
+++ b/bskyweb/templates/post.html
@@ -25,8 +25,10 @@
{% endif -%}
- {%- if imgThumbUrl %}
+ {%- if imgThumbUrls %}
+ {% for imgThumbUrl in imgThumbUrls %}
+ {% endfor %}
{%- elif postView.Author.Avatar %}
{# Don't use avatar image in cards; usually looks bad #}