Change in package structure in CMS Core 12.17.0
Motivation
As of today, EPiServer.CMS.Core relies on SixLabors ImageSharp v2 to do image manipulations under the hood. There have been quite a few WEBP issues being raised lately, which have their root in this library. In order to fix them, we need to upgrade the library to v3. But there are binary incompatible changes between v2 and v3. For partners, who also use ImageSharp v2 directly in their code base, this upgrade could be a breaking change.
Solution
We move the image service's implementation to a separate package, EPiServer.ImageLibrary.ImageSharp, and release it independently from CMS Core. There are two major versions of the package. v1 of the package depends on ImageSharp v2, and v2 of the package depends on ImageSharp v3. You are encouraged to use EPiServer.ImageLibrary.ImageSharp v2 unless ImageSharp API is consumed directly in your code.
What needs to be done
1. For projects with EPiServer.CMS umbrella package reference
When EPiServer.CMS 12.23.0 is out, which has reference to EPiServer.CMS.Core 12.17.0, just update the umbrella package, then you are done. The WEBP issues will be fixed by updating EPiServer.ImageLibrary.ImageSharp
<PackageReference Include="EPiServer.ImageLibrary.ImageSharp" Version="2.0.1" />
If you are on EPiServer.CMS 12.22.x and below and still want to fix WEBP issues, include these package references:
<PackageReference Include="EPiServer.ImageLibrary.ImageSharp" Version="2.0.1" /> <PackageReference Include="EPiServer.Hosting" Version="12.17.0" /> <PackageReference Include="EPiServer.CMS.AspNetCore.TagHelpers" Version="12.17.0" /> <PackageReference Include="EPiServer.CMS.AspNetCore.HtmlHelpers" Version="12.17.0" />
2. For projects with direct reference to CMS Core, e.g. not install EPiServer.CMS
Besides upgrading CMS Core to v12.17.0 and above, you also need an additional reference:
<PackageReference Include="EPiServer.ImageLibrary.ImageSharp" Version="1.0.0" />
Missing this package would cause an exception to be thrown on startup, saying, "It needs to either update 'EPiServer.CMS' package to the latest version, which has dependency on 'EPiServer.ImageLibrary.ImageSharp' package, or install 'EPiServer.ImageLibrary.ImageSharp' package directly into your project."
Comments