Set a max-height on bbcode pictures.

This commit is contained in:
flash 2019-03-09 19:02:16 +01:00
parent 9c739e1062
commit 8d5b49b0e8

View file

@ -9,7 +9,7 @@ final class ImageTag extends BBCodeTag
{
return preg_replace_callback("/\[img\]((?:https?:\/\/).+?)\[\/img\]/", function ($matches) {
$mediaUrl = proxy_media_url($matches[1]);
return sprintf('<img src="%s" alt="%s" style="max-width:100%%;max-height:100%%;">', $mediaUrl, $matches[1]);
return sprintf('<img src="%s" alt="%s" style="max-width:100%%;max-height:900px;">', $mediaUrl, $matches[1]);
}, $text);
}
}