title: Razor - Umbraco: Check if image exists
body: <p>I am trying to display images in umbraco using razor, but at the moment if I dont upload an image then an empty image is displayed, is there a way around this? I was thinking something along the lines of:</p>
  
  <pre><code>if (media.Id != 0)
  {
     &lt;img src="@page.Media("img","umbracoFile")" alt="" /&gt;
  }
  </code></pre>