about summary refs log tree commit diff
path: root/MatrixUtils.Web/Shared/MxcImage.razor
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixUtils.Web/Shared/MxcImage.razor')
-rw-r--r--MatrixUtils.Web/Shared/MxcImage.razor3
1 files changed, 2 insertions, 1 deletions
diff --git a/MatrixUtils.Web/Shared/MxcImage.razor b/MatrixUtils.Web/Shared/MxcImage.razor
index f31c19f..e651c3f 100644
--- a/MatrixUtils.Web/Shared/MxcImage.razor
+++ b/MatrixUtils.Web/Shared/MxcImage.razor
@@ -30,6 +30,7 @@
             StateHasChanged();
         }
     }
+    
     [Parameter]
     public RemoteHomeserver? Homeserver { get; set; }
 
@@ -41,7 +42,7 @@
         }
     }
 
-    private string StyleString => $"{Style} {(Circular ? "border-radius: 50%;" : "")} {(Width.HasValue ? $"width: {Width}px;" : "")} {(Height.HasValue ? $"height: {Height}px;" : "")}";
+    private string StyleString => $"{Style} {(Circular ? "border-radius: 50%;" : "")} {(Width.HasValue ? $"width: {Width}px;" : "")} {(Height.HasValue ? $"height: {Height}px;" : "")} object-fit: cover;";
     
     private static readonly string Prefix = "mxc://";
     private static readonly int PrefixLength = Prefix.Length;