Skip to content

Commit

Permalink
Remove all ImageSharp.Web Processors and the re-add in the correct order
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeavon authored and nathanwoulfe committed Oct 5, 2021
1 parent 23d2106 commit a3744f9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@ public static IServiceCollection AddUmbracoImageSharp(this IUmbracoBuilder build
.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>()
.RemoveProcessor<FormatWebProcessor>()
.RemoveProcessor<BackgroundColorWebProcessor>()
.RemoveProcessor<JpegQualityWebProcessor>()
.AddProcessor<CropWebProcessor>()
.AddProcessor<ResizeWebProcessor>();
.AddProcessor<ResizeWebProcessor>()
.AddProcessor<FormatWebProcessor>()
.AddProcessor<BackgroundColorWebProcessor>()
.AddProcessor<JpegQualityWebProcessor>();

builder.Services.AddTransient<IConfigureOptions<ImageSharpMiddlewareOptions>, ImageSharpConfigurationOptions>();

Expand Down

0 comments on commit a3744f9

Please sign in to comment.