Merge branch 'develop' into feature/bulk-confirmation
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index 94b8dc8c6859808726292f432e91bb3c1782fb6f..435bcde157552b063deb98a72829c3527e6ea60f 100644 (file)
@@ -415,6 +415,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
     [attachment_url | _] = attachment["url"]
     media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image"
     href = attachment_url["href"] |> MediaProxy.url()
+    href_preview = attachment_url["href"] |> MediaProxy.preview_url()
 
     type =
       cond do
@@ -430,7 +431,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       id: to_string(attachment["id"] || hash_id),
       url: href,
       remote_url: href,
-      preview_url: href,
+      preview_url: href_preview,
       text_url: href,
       type: type,
       description: attachment["name"],