fix: comment image rendering
This commit is contained in:
parent
86675725ff
commit
ad0fa15832
1 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,8 @@ defmodule BdfrBrowser.RenderUtils do
|
||||||
end
|
end
|
||||||
|
|
||||||
def message(msg) do
|
def message(msg) do
|
||||||
img_replacement = "<img src=\"/chat_media/\\1\" style=\"max-width: 300px;\" alt=\"Image\" />"
|
img_replacement =
|
||||||
|
"<p class=\"text-center\"><img src=\"/chat_media/\\1\" class=\"img-fluid\" loading=\"lazy\" /></p>"
|
||||||
|
|
||||||
msg
|
msg
|
||||||
|> String.replace(~r/https:\/\/i\.redd\.it\/(.+)/, img_replacement)
|
|> String.replace(~r/https:\/\/i\.redd\.it\/(.+)/, img_replacement)
|
||||||
|
|
Reference in a new issue