title: Sometimes images do not load
body: <p>In my UWP app I have an issue where sometimes not all images are loaded. It is usually one or two images, but I have seen it go to at least 5.</p>
  
  <p>When an image is gone (for example in a <code>ListView</code>), all the images that point to the same file are gone. For example a <code>ListViewItem</code> has a cross in the right-hand corner, it is either there for the entire list or not at all for the entire list.</p>
  
  <p>It takes a while to reproduce (10 to 30 minutes), but I always get the issue. My app does not go over 100MB in debug mode and all images are local (the app is not connected to the internet).</p>
  
  <p>Sometimes the images are loaded by directly (hardcoding) the image in the XAML like so:</p>
  
  <pre><code>&lt;Image Source="/Assets/Images/BackButton.png"/&gt;
  </code></pre>
  
  <p>Or sometimes by having a binding to a property in my class:</p>
  
  <pre><code>&lt;Image Source="{Binding Image}"/&gt;
  public string Image { get; set; }
  </code></pre>
  
  <p>Both of these loading methods cause the image not to show up sometimes.</p>
  
  <p>My users have also reported text not showing up correctly, but I have not been able to reproduce that one. I mention it because it might be related.</p>
  
  <p><strong>EDIT:</strong> I have noticed that when the computer is in a low-memory state (ex: other programs are using 90% of the computer's memory) the images get removed. Is there a way to disable removal of the images to free up memory?</p>