Image Not Displaying
Hi All,
I'm Using Custom Modules For displaying data (version sitefinity 6.2)
I wrote content in rich textbox editor, it's displaying with styles but images are not displaying it showing like
<img src="[images|librariesProvider1]9a358221-bc46-6ba5-86bb-ff0000e9d7ca" title="redstone-map">
Please help me , How to Get Image url instead of GUID
Thanks in Advance
Hello Ajay,
As far as I understood you have created a dynamic module using the Module Builder. Can you please give some details about the module you have created and the data you would like to display. What is the image you would like to display and where do you add this image tag. Is it also possible to send us some screenshots or to record a video demonstrating the steps you take and the behavior on your side.
Regards,
Sabrie Nedzhip
Telerik
Hi Sabrie Nedzhip ,
Yes I'm created Dynamic module using module builder and add two columns (textbox, RichTextEditor). I'm Selecting Image with ImageManager, (please find Attached images). I'm Getting data and displayed in my site it shown wrong image reference (please check image 2 and 3).
Please let me know , i done any mistake
Thank's for Quick Replay,
Hello Ajay,
Thank you for providing me with the additional information about your dynamic module.
I used your approach for displaying a dynamic module item on the frontend by getting the item programmatically. However, I was not able to reproduce the issue and the image which I added through the image manager displayed properly on the frontend. Here is a short video demonstrating the steps I took on my side.
Can you please make sure that the image is displaying properly when you navigate to the url of the image. You can test this by going to Content -> Images and open the library where you have uploaded the image. Then please click on the Actions link of the image and then click View original. Here is also a short video for your convenience.
Regards,
Sabrie Nedzhip
Telerik
Hi Nedzhip,
Hello Ajay,
Thank you for recording a video demonstrating the issue on your side.
It is really a strange issue which I am not able to reproduce in a test Sitefinity 6.2 project. It seems that the link to the image is not properly resolved. This may happen if you have moved the image to another location or if you have changed the url of the image. In this cases when you select the images in the Sitefinity's built-in ContentBlock widget which is using the HtmlField the link is resolved automatically. However, when you use the LongText field as a custom field in a module the link to the image will not be automatically resolved.
Can you please take a look at the following blog post where this issue is described in more details and try to use the suggested approach there for resolving the url by using the LinkParser class:
//get the html from HtmlField and convert it in formt usable for ResolveLinks method
var fixedHtml = LinkParser.UnresolveLinks(Name);
//resolve the links if there has been a change in the url
NameLiteral.Text = LinkParser.ResolveLinks(fixedHtml, DynamicLinksParser.GetContentUrl,
null
,
false
);
Hi Sabrie Nedzhip ,
You are so Great :) it's working Fine.
Really Awesome
Thanks,
Ajay