Search code examples
c#image-resizingimageresizer

Ignore gif files from ImageResizer


We use ImageResizer Performance Edition to resize our images in our portals and it works just fine except with gif files. We have enabled the AnimatedGifs plugin, but the images got way bigger than the original size which seems to be a known issue.

So we got rid of the AnimatedGifs plugin and as a workaround we bypass any image file from ImageResizer if it has the gif extension, for example:

if (imgExtension != ".gif") {
   // add image resizer params ?width=xxx&height=xxx...
}

Is there some other way to solve this with configuration instead of code?


Solution

  • Inageflow .NET Server (The .NET Core version of ImageResizer) produces much smalller animated GIFs than ImageResizer and does so much faster. I would consider switching to this newer project if animated gifs are important to you.

    If you have an ImageResizer subscription then Imageflow is included.