ok
This commit is contained in:
parent
b95d5c2ee5
commit
a4822fce6c
221 changed files with 353 additions and 81 deletions
|
|
@ -21,15 +21,14 @@ func processImage(fileName string) string {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
return dst[4:]
|
||||
return "/" + dst[4:]
|
||||
}
|
||||
|
||||
templ AvifImage(srcPath, alt string, lazy bool, priority bool) {
|
||||
templ AvifImage(srcPath, alt string, lazy bool) {
|
||||
<img src={ processImage(srcPath) } alt={ alt }
|
||||
if lazy {
|
||||
loading="lazy"
|
||||
}
|
||||
if priority {
|
||||
} else {
|
||||
fetchpriority="high"
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue