Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
yesterday I began the process of migrating my Umbraco 8 build over to Umbraco 10. So far it's been pretty flawless (got the build up and running within few hours) - altough I'm struggling to get the WebP optimization to work properly.
I've registered the ImageSharp2 in the startup as follows:
public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
The result I get is that static files are optimized properly, but media library items aren't. I tried putting these methods in different orders but the result is the same.
Maybe anyone knows / sees what is the problem here?
Umbraco should register ImageSharp for you, try removing your own registration and see if that works.
Thanks for your answer - it doesn't have any effect.
I think I found the cause - altough not a fix yet.
My case is that my Media files from Umbraco 8 are stored in folder ~/Media (from the root of the solution).
Newly uploaded files land in ~/wwwroot/media with correct path stored in the DB.
First issue here is that they aren't served properly returning 404.
Second issue here is that the ImageSharp by default expects the source to be coming from wwwroot, therefore it does not work for my existing images. Ref: https://github.com/SixLabors/ImageSharp.Web/issues/135
OK - I've found the solution. Because I've left the Media folder untouched, the same issue happened for me as described here:
I've copied the elements over in the wwwroot/media and removed the original Media folder and both issues are solved.
About my original question:
The ImageSharp does not work without explicitly registering it but that's not a problem.
Now, as the media files are served from wwwroot, it works.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted