Changes for the Glass.Mapper.Sc project:
Glass.Mapper.Sc.{version}
ISitecoreContext is being replaced because it no longer fits with the architecture of Sitecore. It was also a mixture of database access and request context and therefore didn’t have a single responsibility. The above context classes have a clear usage and a single function.
public virtual HtmlString RenderImage<T>(T model, Expression<Func<T, object>> field, object parameters = null, bool isEditable = false)We recommend that you now use the method:
public virtual RenderImage<T>(T model, Expression<Func<T, object>> field, object parameters = null, bool isEditable = false, bool outputHeightWidth = false)NOTE: the older method set the outputHeightWidth to true but the new method is false.
@RenderImage(image, x => x.Image, new { data_id= 100}, isEditable: true)Will be converted to:
<img src="..." data-id="100" />