diff --git a/lib/pages/chat/events/html_message.dart b/lib/pages/chat/events/html_message.dart
index 4d5bcdc8c..fa2d918a6 100644
--- a/lib/pages/chat/events/html_message.dart
+++ b/lib/pages/chat/events/html_message.dart
@@ -272,14 +272,18 @@ class ImageExtension extends HtmlExtension {
final width = double.tryParse(context.attributes['width'] ?? '');
final height = double.tryParse(context.attributes['height'] ?? '');
+ final actualWidth = width ?? height ?? defaultDimension;
+ final actualHeight = height ?? width ?? defaultDimension;
+
return WidgetSpan(
child: SizedBox(
- width: width ?? height ?? defaultDimension,
- height: height ?? width ?? defaultDimension,
+ width: actualWidth,
+ height: actualHeight,
child: MxcImage(
uri: mxcUrl,
- width: width ?? height ?? defaultDimension,
- height: height ?? width ?? defaultDimension,
+ width: actualWidth,
+ height: actualHeight,
+ isThumbnail: (actualWidth * actualHeight) > (256 * 256),
),
),
);
diff --git a/lib/pages/chat/events/message_reactions.dart b/lib/pages/chat/events/message_reactions.dart
index 656f650c6..d91b765b2 100644
--- a/lib/pages/chat/events/message_reactions.dart
+++ b/lib/pages/chat/events/message_reactions.dart
@@ -122,6 +122,7 @@ class _Reaction extends StatelessWidget {
width: 20,
height: 20,
animated: false,
+ isThumbnail: false,
),
if (count > 1) ...[
const SizedBox(width: 4),
diff --git a/lib/pages/chat/input_bar.dart b/lib/pages/chat/input_bar.dart
index f203c3d41..150a7ebc0 100644
--- a/lib/pages/chat/input_bar.dart
+++ b/lib/pages/chat/input_bar.dart
@@ -276,6 +276,7 @@ class InputBar extends StatelessWidget {
: null,
width: size,
height: size,
+ isThumbnail: false,
),
const SizedBox(width: 6),
Text(suggestion['name']!),
diff --git a/lib/pages/chat/sticker_picker_dialog.dart b/lib/pages/chat/sticker_picker_dialog.dart
index eaa066413..96f62b3d4 100644
--- a/lib/pages/chat/sticker_picker_dialog.dart
+++ b/lib/pages/chat/sticker_picker_dialog.dart
@@ -92,6 +92,7 @@ class StickerPickerDialogState extends State {
width: 128,
height: 128,
animated: true,
+ isThumbnail: false,
),
),
);
diff --git a/lib/pages/settings_emotes/settings_emotes_view.dart b/lib/pages/settings_emotes/settings_emotes_view.dart
index fb94b748c..1c6912196 100644
--- a/lib/pages/settings_emotes/settings_emotes_view.dart
+++ b/lib/pages/settings_emotes/settings_emotes_view.dart
@@ -247,6 +247,7 @@ class _EmoteImage extends StatelessWidget {
fit: BoxFit.contain,
width: size,
height: size,
+ isThumbnail: false,
),
);
}