EPi7: EPiImage-7.1 Images are empty after build

Vote:
 

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?

#77932
Nov 28, 2013 17:21
Vote:
 

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);
            }
        }

    

#78016
Dec 02, 2013 8:30
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.