Move default ImageSharp cache folder to TEMP and map configured value to content root

This commit is contained in:
Ronald Barendse
2021-08-18 10:01:33 +02:00
parent a8eae13e0e
commit 34b65404e0
2 changed files with 4 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ namespace Umbraco.Extensions
return Task.CompletedTask;
};
})
.Configure<PhysicalFileSystemCacheOptions>(options => options.CacheFolder = imagingSettings.Cache.CacheFolder)
.Configure<PhysicalFileSystemCacheOptions>(options => options.CacheFolder = builder.BuilderHostingEnvironment.MapPathContentRoot(imagingSettings.Cache.CacheFolder))
// We need to add CropWebProcessor before ResizeWebProcessor (until https://github.com/SixLabors/ImageSharp.Web/issues/182 is fixed)
.RemoveProcessor<ResizeWebProcessor>()
.AddProcessor<CropWebProcessor>()