Using conditional only if there is value present

Is there a way to have this conditional only read if there is actually content inputted in my markdown file?

My conditional is:

  {{ if isset .Params "member_image" }}
      My member image:
      <img src="{{member_image}}">
  {{ end }}

It seems to be working correctly if there is something inputted, like so:
member_image: -http://www.someimageurl.com

But if the markdown file is empty as so, with no image inputted.
member_image:

The ‘My member image’ text still shows up.

Try

  {{ with .Params.member_image }}
      My member image:
      <img src="{{ . }}">
  {{ end }}
3 Likes

thanks @bep that worked great!