Imbedded images in HTML email

jeffkennedy

New Member
Set-up:

I'm publishing an HTML page both as a website and as an email. I understand the IMG SRC tags need to look different for the two applications. As an email, the IMG SRC needs to be only the name of the file attached to the email. As a website, the IMG SRC needs to resolve to the relative or absolute location of the image file, meaning it has directory references included with the name.

Question:

Is there a way to generate HTML that will imbed images for both website and email purposes without requiring tweaking of the HTML for one or the other?

Thanks.
-Jeff
 

jeffkennedy

New Member
Problem is, the images live on a secure corporate network that may not be accessible to the email reader at the time they read their email. So images will be included as attachments in the email. I understand the URL in that case can't have anything but the filename and extension. I saw that in a help file...although I can't find it now.

Thanks for the reply!
-Jeff
 

stanbusk

Administrator
Staff member
In that case yes, you will have to use different documents, one for the web and the other to send by e-mail. As you say, the first uses urls and the other image names (attachment names).
 

jeffkennedy

New Member
Great... Thanks for the confirmation, Stan.

Hmmm... Possible to create a macro of some sort that would take as input html meant to be posted on the web and spit out html suitable for emailing?

Thanks again!
-JK
 

stanbusk

Administrator
Staff member
I guess that would be possible to do and who knows, maybe we will do it at some point.
 

jeffkennedy

New Member
Last gasp on the subject... Dreamweaver has a regex engine. The following search and replace on the html source do the trick:

Search: src="[\w/.%\-]*/([\w%-]*.\w*)"
Replace: src="$1"

This leaves you with html that is ready for MaxBulk...all you've gotta do after that is include the attachments.

Thanks.
-Jeff
 
Top