|
@ -576,10 +576,10 @@ func getHref(c *cli.Context, fpath string, mtype string) (bool, string, error) { |
|
|
thumb, err := genThumb(c, fpath, caption) |
|
|
thumb, err := genThumb(c, fpath, caption) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
logrus.Debugf("failed to generate thumbnail for %s, showing original image", fpath) |
|
|
logrus.Debugf("failed to generate thumbnail for %s, showing original image", fpath) |
|
|
href = fmt.Sprintf("<img class='%s' src=\"%s\" />", stype, fname) |
|
|
href = fmt.Sprintf("<img class='%s' loading='lazy' src=\"%s\" />", stype, fname) |
|
|
} else { |
|
|
} else { |
|
|
href = fmt.Sprintf( |
|
|
href = fmt.Sprintf( |
|
|
"<figure><a href=\"%s\"><img class='thumbnail' loading='lazy' src='data:image/jpg;base64,%s'></a><figcaption>%s</figcaption></figure>", |
|
|
"<figure><a href=\"%s\"><img class='thumbnail' src='data:image/jpg;base64,%s'></a><figcaption>%s</figcaption></figure>", |
|
|
fname, thumb, caption, |
|
|
fname, thumb, caption, |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|