{{ $img := cond (isset $.Params "image") $.Params.image $.Site.Params.image }}
{{/* If `image` param exists, use that in the card. */}}
{{/* If it doesn't, use the video's HQ thumbnail if `youtubeID` parameter exists. */}}
{{ with $.Params.youtubeID }}
{{ $img = cond (isset $.Params "image") $.Params.image ($.Params.youtubeID | printf "https://i.ytimg.com/vi/%s/maxresdefault.jpg") }}
{{ end }}