title: Problem with image base64 encoding: images are 'quite never' displayed in the created html
body: <p>I build an html doc by encoding images with base64.<br>
  Then, I upload the html on google docs, but images are 'quite never' displayed.<br>
  The encoding is right: for example, I use <a href="http://www.motobit.com/util/base64-decoder-encoder.asp" rel="nofollow">this</a> to do the image encoding and then I use it in the <code>img</code> tag for the <code>src</code> attribute, changing properly the data type</p>
  
  <pre><code>&lt;img src='data:image/gif;base64,&lt;IMG_ENCODING&gt;' /&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;img src='data:image/jpeg;base64,&lt;IMG_ENCODING&gt;' /&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;img src='data:image/png;base64,&lt;IMG_ENCODING&gt;' /&gt;
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I think the problem is tied to compression. I tried to use</p>
  
  <pre><code>NSData *imageData = [NSData dataWithData:UIImageJPEGRepresentation(image, 0.0f)];
  </code></pre>
  
  <p>And some of the images (that before aren't displayed) are displayed. But other images aren't. I don't know if there is a limit to the length on the base64 string on gdocs.
  <br>Is there a way to compress the base64 string before sending it to the server? or? </p>
  
  <p>Any hint is greatly welcomed.</p>