Many users do not understand why image do not get embedded using the mimemail module. Many module deliver absolute links to images instead of relative links. Image cache and views have done this in my testing on D6.

I think that it would be good to add a configuration option for the mimemail module to allow all images to be embedded in emails regardless of the link type. A menu option like this:

Mimemail by default only embeds images with relative links. Turning this option on embeds all images.
Embed all images?

This could be turned off by default but noted in the documentation so people know where to change it.

Just my two cents, but I see a lot of confusion surrounding this issue with mimemail. I am not sure I understand why it was decided to only embed images with relative links.

Frederick

Comments

frederickjh’s picture

I also forgot to mention that you can also add to this confusion the pathlogic input filter that will take all relative links and make them absolute links. This is good for feeds and such but it means that images will not get embedded in your emails/newsletters. If you have feed of your newsletters as well the current situation make it tricky to set it up and make it all work.

God Bless!

Frederick

mforbes’s picture

Agreed. The return value from core theme_image() always has an absolute src value even for internal public images such as those uploaded into a node's image file field and rendered, and making these embeddable shouldn't require an override of a core theme function. Any img tag with a src that starts with $base_url (but regardless of http/https/protocol-relative), and where the remainder of the string after $base_url has public access, is a candidate for embedding when the proposed toggle is turned on. Heck, even images on remote sites (when $base_url is not in src string) could be gotten via drupal_http_request() and considered public and embedded, as an even more comprehensive version of this feature.

We really don't need the relative/absolute nature of a URL to be the way of telling mimemail whether we desire a link or an embed. The always link option is good for those who want to always link, but the 'send arbitrary files' option is far too permissive for the case of wanting publicly accessible files to be embedded even when the path is absolute due to things like theme_image().

apaderno’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Active » Closed (outdated)
Issue tags: -mimemail, -relative links, -absolute links, -embedded images

I am closing this feature request, as it's for a not supported project version. If you want to see this feature implemented for a supported project version, please re-open this issue.

mforbes’s picture

I don't personally need this anymore, but my comment above was regarding my experience using the 7.x-1.x branch (I've never used D6).

apaderno’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Closed (outdated) » Active

@mforbes Then we can move to that version. Thank you for your help!