Default configuration #292
-
I don't find it is possible to setting some default configuratio. I mean i want to setting for all web request without pass parameter:
|
Beta Was this translation helpful? Give feedback.
Answered by
JimBobSquarePants
Oct 24, 2022
Replies: 2 comments 6 replies
-
Yeah. You can set them in ImageSharpMiddlewareOptions.OnParseCommands services.AddImageSharp(options =>
{
options.OnParseCommandsAsync = context => {
context.Commands.Add(nameof(BackgroundColorWebProcessor.Color), nameof(Color.White));
context.Commands.Add(nameof(FormatWebProcessor.Format), "png");
return Task.CompletedTask;
};
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Toso82
-
@JimBobSquarePants I have another problem it is possible to change default url request to change image? I mean i want to add some prefix img/{PATH_TO_YOUR_IMAGE}?width=300 for example. Actualy use Azure Storage |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah. You can set them in ImageSharpMiddlewareOptions.OnParseCommands