Skip to content

Commit eb0726a

Browse files
authored
Merge pull request #283 from topcoder-platform/issues-275
Issues-275: images are rendred in emails
2 parents d818ae8 + a282c02 commit eb0726a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vanilla/library/Vanilla/Formatting/Quill/Blots/Embeds/ExternalBlot.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ public function renderQuote(): string {
121121
$formattedSize = Gdn_Upload::formatFileSize($size,2);
122122
return "<p><a href=\"$sanitizedUrl\">$fileName ($formattedSize)</a></p>";
123123
}
124-
124+
} else if($embedType == 'image'){
125+
$fileName = $data['name'] ?? "";
126+
$height = $data['height'] ? "height=\"".$data['height']."\"":"";
127+
$width = $data['width'] ? "width=\"".$data['width']."\"":"";
128+
return "<p><a href=\"$sanitizedUrl\"><img $height $width src=\"$sanitizedUrl\" alt=\"$fileName\"></a></p>";
125129
}
126130

127131
return "<p><a href=\"$sanitizedUrl\">$sanitizedUrl</a></p>";

0 commit comments

Comments
 (0)