|
|
@ -576,10 +576,10 @@ func getHref(c *cli.Context, fpath string, mtype string) (bool, string, error) { |
|
|
|
thumb, err := genThumb(c, fpath, caption) |
|
|
|
if err != nil { |
|
|
|
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 { |
|
|
|
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, |
|
|
|
) |
|
|
|
} |
|
|
|