diff --git a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml index 209c4dc..3d1cf02 100644 --- a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml +++ b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml @@ -434,20 +434,29 @@ } // Generic image embed - else if (embed.Kind == EmbedKind.Image && !string.IsNullOrWhiteSpace(embed.Image?.Url)) + else if (embed.Kind == EmbedKind.Image && !string.IsNullOrWhiteSpace(embed.Url)) { + var embedImageUrl = + embed.Image?.ProxyUrl ?? embed.Image?.Url ?? + embed.Thumbnail?.ProxyUrl ?? embed.Thumbnail?.Url ?? + embed.Url; +
- - Embedded image + + Embedded image
} // Generic gifv embed - else if (embed.Kind == EmbedKind.Gifv && !string.IsNullOrWhiteSpace(embed.Video?.Url)) + else if (embed.Kind == EmbedKind.Gifv && !string.IsNullOrWhiteSpace(embed.Url)) { + var embedVideoUrl = + embed.Video?.ProxyUrl ?? embed.Video?.Url ?? + embed.Url; +
-
} diff --git a/DiscordChatExporter.Core/Exporting/PreambleTemplate.cshtml b/DiscordChatExporter.Core/Exporting/PreambleTemplate.cshtml index 0dc5ebe..60f4085 100644 --- a/DiscordChatExporter.Core/Exporting/PreambleTemplate.cshtml +++ b/DiscordChatExporter.Core/Exporting/PreambleTemplate.cshtml @@ -583,6 +583,8 @@ } .chatlog__embed-generic-image { + object-fit: contain; + object-position: left; max-width: 45vw; max-height: 500px; vertical-align: top; @@ -590,6 +592,8 @@ } .chatlog__embed-generic-gifv { + object-fit: contain; + object-position: left; max-width: 45vw; max-height: 500px; vertical-align: top; @@ -744,6 +748,7 @@ background-color: @Themed("#2f3136", "#f9f9f9"); font-family: "Consolas", "Courier New", Courier, monospace; font-size: 0.85rem; + text-decoration: inherit; } .chatlog__markdown-pre--multiline {