{{ if .Resources.GetMatch "featuredImage.*" }}
    <div class="featured-image">
        <a href="{{ .URL }}">
            {{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }}
                <img src="{{ ((.Resources.GetMatch "featuredImage.*").Fill "700x350 q95").RelPermalink }}" alt="">
            {{ else }}
                <img src="{{ (.Resources.GetMatch "featuredImage.*").RelPermalink }}" alt="">
            {{ end }}
        </a>
    </div>
{{ else if and (isset .Params "featuredimage") (ne .Params.featuredImage "") }}
    <div class="featured-image">
        <a href="{{ .URL }}">
            <img src="{{ .Params.featuredImage | relURL }}" alt="">
        </a>
    </div>
{{ end }}
