| Author |
Message |
jeffkennedy
Joined: 15 May 2006 Posts: 4
|
Posted: Mon May 15, 2006 6:48 pm Post subject: Imbedded images in HTML email |
|
|
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 |
|
| Back to top |
|
 |
stanbusk Site Admin
Joined: 28 Dec 2005 Posts: 2268
|
Posted: Mon May 15, 2006 7:32 pm Post subject: |
|
|
| You can use absolute URLs for both. It is the best way to do it actually. |
|
| Back to top |
|
 |
jeffkennedy
Joined: 15 May 2006 Posts: 4
|
Posted: Wed May 17, 2006 4:16 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
stanbusk Site Admin
Joined: 28 Dec 2005 Posts: 2268
|
Posted: Wed May 17, 2006 3:37 pm Post subject: |
|
|
| 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). |
|
| Back to top |
|
 |
jeffkennedy
Joined: 15 May 2006 Posts: 4
|
Posted: Thu May 18, 2006 2:13 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
stanbusk Site Admin
Joined: 28 Dec 2005 Posts: 2268
|
Posted: Thu May 18, 2006 12:02 pm Post subject: |
|
|
| I guess that would be possible to do and who knows, maybe we will do it at some point. |
|
| Back to top |
|
 |
jeffkennedy
Joined: 15 May 2006 Posts: 4
|
Posted: Wed May 24, 2006 12:07 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|