Reputation: 43
I'm using imagesharp.web. Image width/height is reduced as expected, but size not reduced to fit for web applications(Size is more that 1 MB). I found that Exif data are there in the image contributing to this size.
Is there a way to remove Exif data from a image when we use Imagesharp.web?
Upvotes: 0
Views: 403
Reputation: 10635
You can set the Metadata.ExifProfile
property to null
during OnBeforeSaveAsync
services.AddImageSharp(
options => options.OnBeforeSaveAsync = f =>
{
f.Image.Metadata.ExifProfile = null;
return Task.CompletedTask;
});
Upvotes: 2