I am working in a .NET 6 application. I am already aware of the following answer, but I was looking for a solution where I wouldn't have to install .dll
and manually include it in my project.
That answer is from 2019, and I was wondering if there's a better, easier way of converting a .jpg
or .png
to .webp
.
The user is uploading an image file IFormFile
and I am using ImageSharp to process the image (e.g. re-size it ...etc)
Image standardImage = Image.Load(file.OpenReadStream());
standardImage.Mutate(x => x.Resize(300, 300));
Before uploading the image to S3, I want to convert it to .webp
. Is there a better way than the answer linked above?