code: def email_embed_image(email, img_content_id, img_data):
      
      img = MIMEImage(img_data)
      img.add_header('Content-ID', '<%s>' % img_content_id)
      img.add_header('Content-Disposition', 'inline')
      email.attach(img)
docs: email is a django.core.mail.EmailMessage object