2
votes

When I add an image through Media Library in RichTextEditor, the image path will be like this,

<img src="~/media/A9DCE5769ED7445CA76F984FAF63A7D7.ashx?la=en" />

However, when I publish page item with this image, the image doesn't appear in Live.

If I manually put slash ("/") in front of path, it works.

<img src="/~/media/A9DCE5769ED7445CA76F984FAF63A7D7.ashx?la=en" />

I know that (~) means root, but sitecore doesn't catch it. Do I have to always put slash manually????

I have checked this https://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2012/12/sitecore-idiosyncrasies-media-urls.aspx

But, I'm really looking for the simplest way to fix this issue. (I'm using 7.0)

============ Update ===============

I have changed prefix like "/-/media", but still NOT working!!!

1
Normally, URL resolution works pretty well out of the box... Do you have any custom code in the httpBeginRequest pipeline or any changes to the default LinkManager?Juzzbott
How do you generate link to media in view?jacbar
In page editor, click RichTextEditor field, click Image icon in design mode, browse image file I want to and add.Jay

1 Answers

1
votes

I solved the issue by changing only one line in Web.config file.

<setting name="Media.MediaLinkPrefix" value="//~/media" />

But, I don't know why I have to add two slashes. One slash is not working (same as "~/media")

Is there anybody know why???????