Fixing my Dave Atkinson Problem

Friend Dave Atkinson sent a helpful note this morning:

I love getting your blog delivered to my inbox, but I note that something in the process makes photos not appear. Error messages on everything but the header.

I checked, and Dave was right: people subscribing to my posts by email have been seeing broken images in most situations. I set out to fix that (friends like Dave don’t come along every day).

The source of the problem was that, in the HTML of the body of my posts, I was inserting images like this:


In the normal course of affairs that’s fine: because the HTML is on a page already on, browsers are smart enough to know “that image onetweet.jpg, I’ll look for that on”

But outside, in the harsh cruel world of email, no such logic applies, and so the images appear broken.

The solution is to change the images to reference the complete absolute URL, rather than just the relative path, like this:

Fortunately there’s a Drupal module called Pathlogic that does exactly that. And it was easy to set up. I just installed the module, enabled it, and then set it to use the “Full URL,” like this:

Screen shot of Pathlogic settings for Drupal

Finally, on the Text Format setting–Full HTML–that I use for my post body field, I checked the “Correct URLs with Pathlogic” setting:

Screen shot of the "Current URLs with Pathlogic" setting for the Full HTML text format

And now the URLs, both here on the blog and in the RSS feed (which is what drives the email subscription system, via MailChimp) work in any context.


Dave Atkinson's picture
Dave Atkinson on February 16, 2017 - 12:27 Permalink

I might point out that all of my problems are Dave Atkinson problems.