Images inserted in the Richtext Editor isn't visible in Hotmail
When an image is inserted in the Richtext Editor, the path to the image will be something like "/media/276/image.jpg". But I am making a newsletter, where content from the RTE is inserted. This means that if an image is inserted, and the newsletter is sent to some different e-mails, the images from the RTE is not always displayed.
Actually both Gmail and Yahoo shows the images, but Hotmail can't fint the image. Yahoo and Gmail can figure the TLD out by the self. So a path to an image in Gmail and Yahoo will be: http://mydomain.com/media/276/image.jpg but in Hotmail it will be: "http:///media/276/image.jpg".
Does anyone have an idea, how to get arround this problem?
You could always write out the TLD manually, bu doing a string replace in XSLT and replace '/media/' with 'http://mytld.com/media/', or automate it by using umbraco.library:RequestServerVariables('HTTP_HOST').
I have used your code from the other post. Just changed it a small bit, because there where some white space in my src, and hotmail still couldn't understand that.
This is maybe because I haven't hardcoded the full URL, but uses the SERVER_NAME. This means that I can use it on other domains as well in the future. So my template looks like this now:
Images inserted in the Richtext Editor isn't visible in Hotmail
When an image is inserted in the Richtext Editor, the path to the image will be something like "/media/276/image.jpg". But I am making a newsletter, where content from the RTE is inserted. This means that if an image is inserted, and the newsletter is sent to some different e-mails, the images from the RTE is not always displayed.
Actually both Gmail and Yahoo shows the images, but Hotmail can't fint the image. Yahoo and Gmail can figure the TLD out by the self. So a path to an image in Gmail and Yahoo will be: http://mydomain.com/media/276/image.jpg but in Hotmail it will be: "http:///media/276/image.jpg".
Does anyone have an idea, how to get arround this problem?
You could always write out the TLD manually, bu doing a string replace in XSLT and replace '/media/' with 'http://mytld.com/media/', or automate it by using umbraco.library:RequestServerVariables('HTTP_HOST').
This post is related, and gives a few ideas how you might solve it.
cheers,
doug.
I believe doug intended to link to this post ->
http://our.umbraco.org/forum/developers/xslt/4449-How-can-I-convert-all-relative-paths-%28href%27s-and-src%27s%29-to-absolute-ones-using-the-resolve-uri%28%29-function?p=0#comment16141
Dan
Thanks for looking out for me, Dan! That was the link I meant to include.
cheers,
doug.
Thanks Douglas and Dan.
I'll try the method out. But just a follow question to the method.
How do I use it when I write out my content-field? Right now it is written out like this:
But is it possible to hook into the content-field or how? Thank you very much for your patience and help.
Using the code I showed in the other forum post, you would replace
with
cheers,
doug.
You are the man Doug!
I have used your code from the other post. Just changed it a small bit, because there where some white space in my src, and hotmail still couldn't understand that.
This is maybe because I haven't hardcoded the full URL, but uses the SERVER_NAME. This means that I can use it on other domains as well in the future. So my template looks like this now:
But thanks a lot for your help Doug :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.