The following code is to create a thumbnail using github.com/disintegration/imaging package
works well for typical image format like jpeg, but it does not work well for webp file format.
I got errorimaging: unsupported image format with the code below.
Is there a more robust way to generate thumbnails for typical image types (jpg, gif, tiff, bmp, etc.) and webp?
As far as I understand the WEBP format is not supported in Go yet. I ended up making calls to an external program dwebp (linux) to convert from WEBP to JPG or PNG. It can probably be used in the other direction too. I am confident that a similar program exists on Windows or Mac.