diff options
Diffstat (limited to 'Pages')
| -rw-r--r-- | Pages/Gallery.razor | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Pages/Gallery.razor b/Pages/Gallery.razor index 6b8e330..b94c694 100644 --- a/Pages/Gallery.razor +++ b/Pages/Gallery.razor @@ -11,8 +11,11 @@ <link rel="stylesheet" href="@(nameof(HyperBooru)).styles.css"/> @foreach(var media in Media) { + // Precalculate thumbnail size to help the browser + // lay out the images during initial page load + int width = media.Width * 200 / media.Height; <a href="/ViewMedia?m=@(media.Guid)"> - <img src="/media/thumb/@(media.Guid)?h=200" /> + <img src="/media/thumb/@(media.Guid)?h=200" width=@width height="200"/> </a> } |
