title: Image is not shown on live server
body: <p>I have a logo that I need to show inside a mail. On my local machine, the logo is shown, but on the server where the live environment is, the logo is not shown.</p>
  
  <p>I'm using the path like this:</p>
  
  <pre><code>imagePath = "~/Images/email-logo2.png";
  </code></pre>
  
  <p>The <code>email-logo2.png</code> exists in the same folder on the local machine and on the server, too.</p>
  
  <p><a href="https://i.stack.imgur.com/RYGjY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RYGjY.png" alt="enter image description here"></a></p>
  
  <p>I have tried to add permissions to read in the server folder where the png exists, but it did not resolve the problem. Can you advise?</p>
  
  <p>The image is added in the email like this:</p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;img class="auto-style4" src="{PictureSrc}" /&gt;&lt;br /&gt;
  </code></pre>
  
  <p>C# code:</p>
  
  <pre><code>switch (property)
  {
      case "PictureSrc":
          string imagePath = "";
  
          if (User.Identity.GetUserId&lt;int&gt;() == 3140 || 
              User.Identity.GetUserId&lt;int&gt;() == 3142)
          {
              imagePath = "~/Images/email-logo2.png";
          }
          else
          {
              imagePath = "~/Images/email-logo.png";
          }
  
          content = content.Replace("{" + property + "}", HttpContext.Server.MapPath(imagePath));
  </code></pre>