Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
I've built my own helper function for this to make it work.
//Fixes images not rendering after solution build
public static EPiImageGalleryImageCollection GetImageList(PageReference pageLink, string property)
{
try
{
var page = EPiServer.DataFactory.Instance.GetPage(pageLink);
EPiImageGalleryProperty galleryProperty = page.Property[property] as EPiImageGalleryProperty;
return galleryProperty == null ? null : galleryProperty.ConvertXhtmLtoImageCollection(galleryProperty.XhtmlString.ToString());
}
catch (Exception ex)
{
throw new Exception(ex.Message, ex);
}
}
EPiImage-7.1 plugin: https://github.com/tuanvt/EPiImage-7.1
I've noticed that all images in a list (EPiImageGalleryImageCollection) are empty after a project is build. But they are still visible in the EPiServer editor. If the page is re-published the images show up correctly on the site.
Any idea?