title: Correct way to load image into UIWebView from NSData object
body: <p>I have downloaded a gif image into an NSData object (I've checked the contents of the NSData object and it's definitely populated). Now I want to load that image into my UIWebView. I've tried the following:</p>
  
  <pre><code>[webView loadData:imageData MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];
  </code></pre>
  
  <p>but I get a blank UIWebView. Loading the image from the same URL directly works fine:</p>
  
  <pre><code>NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:imageUrl]];
  [imageView loadRequest:request];
  </code></pre>
  
  <p>Do I need to set the textEncodingName to something, or am I doing something else wrong?</p>
  
  <p>I want to load the image manually so I can report progress to the user, but it's an animated gif, so when it's done I want to show it in a UIWebView.</p>
  
  <p>Edit: Perhaps I need to wrap my image in HTML somehow? Is there a way to do this without having to save it to disk?</p>