images.yml should once again support local file paths

This commit is contained in:
Kwoth
2022-07-06 04:15:16 +02:00
parent 43dd37c4f1
commit 2fb4bb2ea4

View File

@@ -59,6 +59,11 @@ public sealed class ImageCache : IImageCache, INService
GetImageKey(url),
async () =>
{
if (url.IsFile)
{
return await File.ReadAllBytesAsync(url.LocalPath);
}
using var http = _httpFactory.CreateClient();
var bytes = await http.GetByteArrayAsync(url);
return bytes;