Ensure GIFs are redirected to the original or they become static.
This commit is contained in:
parent
2c95533ead
commit
eead2276e7
1 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,12 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp handle_preview("image/gif" = _content_type, conn, url) do
|
||||||
|
mediaproxy_url = url |> MediaProxy.url()
|
||||||
|
|
||||||
|
redirect(conn, external: mediaproxy_url)
|
||||||
|
end
|
||||||
|
|
||||||
defp handle_preview("image/" <> _ = _content_type, conn, url) do
|
defp handle_preview("image/" <> _ = _content_type, conn, url) do
|
||||||
handle_image_preview(conn, url)
|
handle_image_preview(conn, url)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue