diff --git a/distribusi.go b/distribusi.go index 0e0ead2..cccfb29 100644 --- a/distribusi.go +++ b/distribusi.go @@ -453,14 +453,8 @@ func getMtype(fpath string) (string, error) { // genThumb generates an in-memory image thumbnail and encodes it into a base64 // representation which is suitable for embedding in HTML pages. func genThumb(c *cli.Context, fpath, caption string) (string, error) { - knownFailureExts := []string{".ico", ".svg", ".xcf"} - if sliceContains(knownFailureExts, filepath.Ext(fpath)) { - return "", fmt.Errorf("unable to generate thumbnail for %s", fpath) - } - imgSrc, err := imaging.Open(fpath, imaging.AutoOrientation(true)) if err != nil { - logrus.Debugf("failed to generate thumbnail for %s", fpath) return "", err } @@ -577,8 +571,8 @@ func getHref(c *cli.Context, fpath string, mtype string) (bool, string, error) { } else { thumb, err := genThumb(c, fpath, caption) if err != nil { - unknown = true - href = fmt.Sprintf("%s", stype, fname, fname) + logrus.Debugf("failed to generate thumbnail for %s, showing original image", fpath) + href = fmt.Sprintf("", stype, fname) } else { href = fmt.Sprintf( "
%s
",