Imaging: Upgrade ImageSharp to v4 (keep v2 as a supported option)#23334
Draft
AndyButland wants to merge 1 commit into
Draft
Imaging: Upgrade ImageSharp to v4 (keep v2 as a supported option)#23334AndyButland wants to merge 1 commit into
AndyButland wants to merge 1 commit into
Conversation
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
Upgrades the default imaging package (
Umbraco.Cms.Imaging.ImageSharp) from ImageSharp 3 to ImageSharp 4, keepingUmbraco.Cms.Imaging.ImageSharp2(ImageSharp 2) as a supported option. The dedicated ImageSharp 3 package is not retained.Licensing context. ImageSharp 4 adds a build-time licence check for projects that reference it directly (the Split License terms are unchanged from v3 — only enforcement is new). Because this is a public, open-source repository we cannot commit a licence key, so both package references use
ExcludeAssets="build". The licence check ships in the package's MSBuildbuild/assets, so excluding them means the CMS builds with nosixlabors.licfor CI, contributors and forks, while thecompile/runtimeassets flow normally and the library is unaffected.PackageReferencetoSixLabors.ImageSharp[.Web]is subject to the check.Changes
Directory.Packages.props:SixLabors.ImageSharpandSixLabors.ImageSharp.Web→4.0.0.Umbraco.Cms.Imaging.ImageSharp.csproj:ExcludeAssets="build"on both references.UmbracoBuilderExtensions.cs: one namespace fix — v4 moved the DI/pipeline extensions (AddImageSharp,AddProvider,AddProcessor,ClearProviders,UseImageSharp) fromSixLabors.ImageSharp.Web.DependencyInjectionto the rootSixLabors.ImageSharp.Webnamespace.CLAUDE.mdfiles (v4 references, licensing/build notes).The
Umbraco.Cms.Imaging.ImageSharp2project and theUmbraco.Cmsmeta-package reference are unchanged.Testing
Solution should build and CI checks pass; existing ImageSharp unit tests (
ImageSharpImageUrlGeneratorTests,CropWebProcessorTests) cover URL generation and crop maths.Cropped images should continue to be served at the expected dimensions on a running site.