Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I could not find how to get all MediaFiles properties mapped from Umbraco IPublishedContent Image.
After mapping only:
are set. How about size, extension, etc? Do I need to set it up to map manually?
public static object MapImage<T>(IUmbracoMapper mapper, IPublishedContent contentToMapFrom, string propertyName,
bool isRecursive) where T : MediaFile, new()
var image = new T();
var content = contentToMapFrom.GetPropertyValue<IPublishedContent>(propertyName, isRecursive);
if (content != null)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted