Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mary 15 posts 123 karma points
    Jul 14, 2023 @ 13:52
    Mary
    0

    Umbraco 12 and switch back to ImageSharp Version 2

    Hi there

    In your blogpost (https://umbraco.com/blog/umbraco-12-release/#license) about the Umbraco 12 release you wrote that it is somehow possible to switch the ImageSharp from Version 3 back to ImageSharp 2.

    Unfortunately I didn't find any documentation about how to do this.

    I figured out that there is an Nuget Package Umbraco.Cms.Imaging.ImageSharp2. But this does not really seem to replace the ImageSharp version. Instead whichever ImageSharpComposer will register, this version will be used.

    So how can I make sure, that the ImageSharp 2 is used in Umbraco and in my own project and custom code?

    Thanks for your support.

  • Sebastian Felis 9 posts 127 karma points
    Sep 27, 2023 @ 15:51
    Sebastian Felis
    1

    Hi,

    I write an extending package for Umbraco and I stumbled upon at this problem. After a long search I found how it's should work. Umbraco.Cms package is only pack of default references, it's doasn't has any code. To use Umbraco.Cms.Imaging.ImageSharp2 package you must in your project add only references that you need to. Umbraco.Cms package by default contains references to the follow packages:

    • Umbraco.Cms.Targets
    • Umbraco.Cms.Imaging.ImageSharp
    • Umbraco.Cms.Persistence.Sqlite
    • Umbraco.Cms.Persistence.SqlServer
    • Umbraco.Cms.Persistence.EFCore.Sqlite
    • Umbraco.Cms.Persistence.EFCore.SqlServer

    Remove reference to Umbraco.Cms package, chose the references thats you need from above and replace Umbraco.Cms.Imaging.ImageSharp with Umbraco.Cms.Imaging.ImageSharp2. After this you will create a project that will only use ImageSharp in version 2.

    I hope this information will help someone.

Please Sign in or register to post replies

Write your reply to:

Draft