Ensure GIFs are redirected to the original or they become static.
This commit is contained in:
parent
2c95533ead
commit
eead2276e7
|
@ -65,6 +65,12 @@ defp handle_preview(conn, url) do
|
|||
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
|
||||
handle_image_preview(conn, url)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue