-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a setting so providers can process images when no commands are supplied. #83
Add a setting so providers can process images when no commands are supplied. #83
Conversation
…cted This allows providers to determine whether they should continue processing an image when no commands are supplied. This is important for remote providers - such as the azure blob provider - as they are unable to fall back on the static files middleware to serve images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pandorax100 Thanks for this, much appreciated!
I think if we make a couple of minor changes this will be good to go.
I completely agree. The interface has had the setter removed, and the setting has been changed to an enum. |
This looks good. My only caveat (just from working around this issue) is that when an image comes in with no commands and is supported as So it just means that the image will always be mutated in some way (which has an impact on memory / performance) It would be nice if when there are no commands the image wasn't mutated, but I leave that choice with @JimBobSquarePants |
src/ImageSharp.Web.Providers.Azure/Providers/AzureBlobStorageImageProvider.cs
Outdated
Show resolved
Hide resolved
@deanmarcussen makes a valid point above @Pandorax100 We're still fully loading and saving the image when there are no commands. I'm happy to accept this as-is and do the work though. I'm currently updating the build process and changing the targets to sensible ones (Core 3.1, Core 2.1) so don't want to keep you waiting longer than you need to. |
Yeah, I see the problem I've just had a little look and it doesn't seem like |
Totally fine. Will get this merged ASAP. |
Prerequisites
Description
Addresses #77
This exposes a setting on individual providers to determine whether they should continue processing an image when no commands are supplied. This is important for remote providers - such as the
AzureBlobStorageImageProvider
- as they are unable to fall back on the static files middleware to serve images.