Skip to content

Commit

Permalink
richcontent: Use lazy image loading
Browse files Browse the repository at this point in the history
  • Loading branch information
robertabcd committed Dec 24, 2021
1 parent cc8a67e commit 2ac2665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion richcontent/url_based_finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func newUrlPattern(pattern string, handler UrlPatternHandler) *UrlPattern {
}

func imageHtmlTag(urlString string) string {
return fmt.Sprintf(`<img src="%s" alt="" />`, html.EscapeString(urlString))
return fmt.Sprintf(`<img src="%s" alt="" loading="lazy" />`, html.EscapeString(urlString))
}

// Handlers
Expand Down

0 comments on commit 2ac2665

Please sign in to comment.