{{ if not (hasPrefix .Destination "http" ) }} {{ $avifPath:= replace .Destination (path.Ext .Destination) ".avif" }} {{ $avifPathStatic := printf "%s/static/%s" .Page.File.Dir $avifPath }} {{ if (fileExists $avifPathStatic) -}} {{- end }} {{ if eq (path.Ext .Destination) ".jpg" }} {{ end }} {{ if eq (path.Ext .Destination) ".jpeg" }} {{ end }} {{ if eq (path.Ext .Destination) ".png" }} {{ end }} {{ end }} {{ .PlainText }}
{{ if not (hasPrefix .Destination "http") }} {{ $avifPath:= replace .Destination (path.Ext .Destination) ".avif" }} {{ $avifPathStatic := printf "%s/static/%s" .Page.File.Dir $avifPath }} {{ if (fileExists $avifPathStatic) -}} {{- end }} {{ if eq (path.Ext .Destination) ".jpg" }} {{ end }} {{ if eq (path.Ext .Destination) ".jpeg" }} {{ end }} {{ if eq (path.Ext .Destination) ".png" }} {{ end }} {{ end }} {{ .PlainText }}