title: Displaying inline images on iPhone, iPad
body: <p>I'm trying to create an email in Django with inline images. </p>
  
  <pre><code>msg = EmailMultiAlternatives(...)
  image_file = open('file_path', 'rb') 
  img = MIMEImage(img_data)
  image_file.close()
  img.add_header('Content-ID', '&lt;image1&gt;') 
  img.add_header('Content-Disposition', 'inline')
  msg.attach(img)
  msg.send()
  </code></pre>
  
  <p>And in the template I would reference it like so:</p>
  
  <pre><code>&lt;img src="cid:image1" /&gt;
  </code></pre>
  
  <p>This works fine in web browsers, outlook, thunderbird ... all except for the apple mail client on OSX, iPad and iPhone. The images are displayed twice. They are placed inline correctly but they are also attached to the bottom of the email. My question is, how do I get rid of the images at the bottom? or should I approach images in emails differently. </p>
  
  <p>References:<br>
  <a href="http://djangosnippets.org/snippets/1507/" rel="nofollow noreferrer">http://djangosnippets.org/snippets/1507/</a><br>
  <a href="https://stackoverflow.com/questions/3787755/django-how-to-send-html-emails-with-embedded-images">Django: How to send HTML emails with embedded images</a><br>
  <a href="https://stackoverflow.com/questions/1633109/creating-a-mime-email-template-with-images-to-send-with-python-django">creating a MIME email template with images to send with python / django</a></p>