diff --git a/main.go b/main.go index 6fe28d0..cb3350c 100644 --- a/main.go +++ b/main.go @@ -216,6 +216,41 @@ func renderIndex(w http.ResponseWriter) { renderTemplate(w, "index.html", nil) } +// Helper function to add loading="lazy" to all img tags +func injectLazyLoading(htmlContent string) string { + // Split the content by ") + if endOfTag == -1 { + // If no closing bracket is found, add the remaining part as is + modifiedContent += "