There's lots of solutions that work nicely and also have support for modern formats such as WebP. The best ones IMO in order are
Image Resizer https://nuget.optimizely.com/package/?id=ImageResizer.Plugins.EPiServerBlobReader - Blog here https://devblog.gosso.se/2021/09/serve-images-in-next-gen-formats-with-imageresizer/
We use ImageProcessor very effectivly for Image Resizing via Picture tags for Optimized responsive images.
Also the Polish on the DXP from your linked blog post (more info in my own blog post https://world.optimizely.com/blogs/scott-reed/dates/2018/5/dxc-automatic-image-optimization/ ) is just for Optimizing file sizes of images it doesn't resize.
Thanks for the quick reply, Scott!
Aren't these nuget packages for CMS 11? What I'm looking for needs to be compatible with CMS 12 .NET 5.
Sorry yes if you're looking for .NET 5 supported addons those have not been migrated. In fact very few packages from the community have offical full CMS 12 support currently.
I would hope they will get updated, but at the moment if https://github.com/ErikHen/PictureRenderer.Optimizely/tree/main isn't working properly you will have trouble getting anything else to work as CMS 12 and Commerce 14 only just came out.
Although it's the same guy who's created ImageProcessor and PictureRenderer.Optimizely so he may not be supporting ImageProcessor now as it's not been updated in a ages. Which is a shame as it was my favourite although this could be just a newer version for .NET 5
In CMS11 sites we generally used to use ImageProcessor although as the packages have not been upgraded to work with .Net 5, we are trying out SixLabors.ImageSharp library which seems to be working really well for us.
Hi! Wich package has dependency to EPiServer.CMS.Core 12.0.4 ?
In the feed it says that Baaijte.Optimizely.ImageSharp.Web has a dependency to EPiServer.CMS.Core (≥ 12.0.0 && < 13.0.0), and PictureRenderer.Optimizely has a dependency to EPiServer.CMS.Core (≥ 12.0.3 && < 13.0.0).
If there is a dependency mismatch I'm sure me or Vincent can fix it easily.
But when I peek here it actually seems to be using 12.0.4: https://github.com/vnbaaij/Baaijte.Optimizely.ImageSharp.Web/blob/main/src/Baaijte.Optimizely.ImageSharp.Web/Baaijte.Optimizely.ImageSharp.Web.csproj
I'll ping Vincent...
I would assume that resizing using the ImageDescriptor attribute works fine in CMS 12.
Together with Cloudflare and Polish it does a pretty good job if you can make it not do PNGs of JPGs.
Kolbein, Please test with the latest version of
Baaijte.Optimizely.ImageSharp.Web (new version today).
Thanks, it now seems to work fine! Although, I encountered a problem where I had to manually install the SixLabors.ImageSharp.Web nuget (1.0.4) after receiving this error message:
FileNotFoundException: Could not load file or assembly 'SixLabors.ImageSharp.Web, Version=184.108.40.206'
Also worth noting that it looks like Six Labors ImageSharp is what CMS 12 uses internally.
Has anybody found a way of resizing images for optimization in CMS 12 (and DXP)?
What I've found so far is PictureRenderer.Optimizely which uses Baaijte.Optimizely.ImageSharp.Web, but currently isn't working properly due to the package having a dependency for EPiServer.CMS.Core 12.0.4 and the latest EPiServer.CMS 12.1.0 package having a dependency for EPiServer.CMS.Core 12.0.3.
I've also seen this article about CloudFlare resizing images, but I'm curious if anybody has got image resizing working.