-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
v10: Update to ImageSharp v2 #12185
Merged
Merged
v10: Update to ImageSharp v2 #12185
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ff153cd
Update to ImageSharp 2.1.0 and ImageSharp.Web 2.0.0-alpha.0.23
ronaldbarendse e8d82af
Rename CachedNameLength to CacheHashLength and add CacheFolderDepth s…
ronaldbarendse 5fa02e9
Replace PhysicalFileSystemProvider with WebRootImageProvider
ronaldbarendse da34c09
Support EXIF-orientation in image dimention extractor
ronaldbarendse 91fbdb2
Remove virtual methods on FileProviderImageProvider
ronaldbarendse 827ae60
Simplify FileInfoImageResolver
ronaldbarendse 8efb526
Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.25 and remove custom…
ronaldbarendse d35dfc6
Make CropWebProcessor EXIF orientation-aware
ronaldbarendse ba491ec
Improve width/height sanitization
ronaldbarendse 5b973a9
Also use 'v' as cache buster value
ronaldbarendse 2cbef09
Add WebP to supported image file types
ronaldbarendse e7f74dc
Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.27 and fix test
ronaldbarendse 70e2437
Fix rounding error and add test cases
ronaldbarendse 67b8dbc
Update to newest and stable releases
ronaldbarendse 5b758db
Merge branch 'v10/dev' into v10/feature/imagesharp2
ronaldbarendse 798a3bd
Merge branch 'origin/v10/dev' into v10/feature/imagesharp2
ronaldbarendse cac5402
Move ImageSharpImageUrlGenerator to Umbraco.Web.Common
ronaldbarendse 3cae534
Use IConfigureOptions to configure ImageSharp options
ronaldbarendse 10eb181
Implement IEquatable on ImageUrlGenerationOptions classes
ronaldbarendse 2de5520
Fix empty/null values in image URL generation and corresponding tests
ronaldbarendse 5898b0c
Use IsSupportedImageFormat extension method
ronaldbarendse 5cb9a9b
Remove unneeded reflection
ronaldbarendse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,7 +200,6 @@ public static IUmbracoBuilder AddCoreInitialServices(this IUmbracoBuilder builde | |
// Add default ImageSharp configuration and service implementations | ||
builder.Services.AddSingleton(SixLabors.ImageSharp.Configuration.Default); | ||
builder.Services.AddSingleton<IImageDimensionExtractor, ImageSharpDimensionExtractor>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally we add a NoopImpementation so you can boot Infrastructure without the web assemblies |
||
builder.Services.AddSingleton<IImageUrlGenerator, ImageSharpImageUrlGenerator>(); | ||
|
||
builder.Services.AddSingleton<PackageDataInstallation>(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 0 additions & 107 deletions
107
src/Umbraco.Infrastructure/Media/ImageSharpImageUrlGenerator.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This setting doesn't seem to be used: the supported image file types are now retrieved from the
IImageUrlGenerator.SupportedImageFileTypes
property and theImageSharpImageUrlGenerator
implementation dynamically retrieves the supported ones from the ImageSharp configuration instead.These image file types are then used to for more then just generating image URLs though (e.g. whether to extract image dimensions to auto-fill properties, disallow file uploads that are not images and automatically changing the media type from
File
toImage
).I suggest keeping this setting and create a separate PR to fix the mixed usage, so:
ContentImagingSettings.ImageFileTypes
is used to determine whether the uploaded file is a valid image and if it can automatically change the media type toImage
;IImageUrlGenerator.SupportedImageFileTypes
is used whether it can generate an image URL for a specified file;IImageDimensionExtractor.SupportedImageFileTypes
property is added that exposes whether it can get dimensions for a specified file (and have theImageSharpDimensionExtractor
populate this the same way as theImageSharpImageUrlGenerator
currently does).