diff --git a/lib/packages/ui/src/widgets/media/media_view.dart b/lib/packages/ui/src/widgets/media/media_view.dart index f9d95f79d..de7b4cb36 100644 --- a/lib/packages/ui/src/widgets/media/media_view.dart +++ b/lib/packages/ui/src/widgets/media/media_view.dart @@ -261,6 +261,12 @@ class _MediaViewState extends State with TickerProviderStateMixin { height = (widget.showFullHeightImages && !widget.allowUnconstrainedImageHeight) ? widget.media.height : null; } + final shouldContainTallFullHeightImage = widget.media.mediaType == ContentMediaType.image && + widget.viewMode == ContentViewMode.comfortable && + widget.showFullHeightImages && + widget.media.height != null && + widget.media.height! > getMaxHeight(); + Widget? child; if (widget.media.mediaType == ContentMediaType.link) { @@ -410,7 +416,11 @@ class _MediaViewState extends State with TickerProviderStateMixin { contentType: widget.media.contentType, width: width, height: height, - fit: widget.viewMode == ContentViewMode.compact ? BoxFit.cover : BoxFit.fitWidth, + fit: widget.viewMode == ContentViewMode.compact + ? BoxFit.cover + : shouldContainTallFullHeightImage + ? BoxFit.contain + : BoxFit.fitWidth, mediaType: widget.media.mediaType, viewed: widget.read, blur: blurNSFWPreviews,