diff --git a/src/Libraries/Nop.Services/Media/RoxyFileman/FileRoxyFilemanService.cs b/src/Libraries/Nop.Services/Media/RoxyFileman/FileRoxyFilemanService.cs index cb154e1db45..9d15c510b01 100644 --- a/src/Libraries/Nop.Services/Media/RoxyFileman/FileRoxyFilemanService.cs +++ b/src/Libraries/Nop.Services/Media/RoxyFileman/FileRoxyFilemanService.cs @@ -543,7 +543,8 @@ public virtual async Task GetFilesAsync(string directoryPath, string type) if (GetFileType(_fileProvider.GetFileExtension(files[i])) == "image") { await using var stream = new FileStream(physicalPath, FileMode.Open); - var image = SKBitmap.DecodeBounds(stream); + var skData = SKData.Create(stream); + var image = SKBitmap.DecodeBounds(skData); width = image.Width; height = image.Height; }