Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
When you have image Id, you can get the ContentReference of the image, then use IContentRepository to load the content and use UrlResolver to get the public URL, which should be the path to the image.
Regards.
/Q
@Url.ContentUrl(ServiceLocator.Current.GetInstance<IContentRepository>().Get<ImageData>(item.Property["Product_Image"].Value))
Thanks Quan and Valdis, I was able to solve it using below:
@Url.ContentUrl(item.GetPropertyValue<ContentReference>("Product_Image"))
Hi,
I am using Page listing Block to list all the pages in the parent page. I am able to display all the properties of child except the image.
The image file property is displaying image ID.
@item.Property["Product_Image"].Value
Thanks
Pankaj