{{ if eq .ResourceType "image" }} {{/* TODO: figure out whether loading="lazy" should be set because MDN * claims that images won't work with JS disabled since it would * make tracking possible, but my experience says otherwise */}} {{ else if eq .ResourceType "video" }} {{ else }} {{/* TODO: could consider implementing more types, listed at: * https://www.iana.org/assignments/media-types/media-types.xhtml */}} {{ errorf "Handling %q resource not supported" .ResourceType }} {{ end }}