How to insert inline images in Gmail

Polaroids
Photo by kk+

One thing I really miss when I’m using Gmail compared to Apple’s Mail.app or Outlook is the ability to include inline images. Whenever I’m trying to explain almost anything I rely on pictures, and if you can’t insert them in the flow of the text they lose their context. It’s tough telling a story if you can’t illustrate it.

There isn’t a technical reason behind their lack of inline images, you can actually insert your own if you’re willing to jump through some hoops:

– First upload the image to a website, using ImageShack if you don’t have your own
– Open up that image in a new browser window
– Do a ‘Select All’ in Firefox to copy the HTML for that image
– Paste the HTML into the email composition box within Gmail

Having to upload images a big pain, and still doesn’t allow the simple insertion of a desktop app. If there’s any Gmail programmers reading, here’s what you need to do to enable inline image attachments:

– Set the Content-Disposition header of the image attachment to ‘inline’
– Set the Content-ID header to a unique identifier (the cid)
– In the HTML body of the message, reference it as <img src="cid:<that identifier>"/>

Gmail even displays messages created like this correctly, so there’s obviously the internal know-how within Google to implement it. The lack of this widely-requested feature several years after launch is a real shame, and part of the reason I’ve become worried about Gmail’s lack of progress. Here’s hoping they’re busy behind the scenes!

One response

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: