﻿@model dynamic
@using Umbraco.Web.Templates

@if (Model.value != null)
{   
    var url = Model.value.image;
    if(Model.editor.config != null && Model.editor.config.size != null){
        url += "?width=" + Model.editor.config.size.width;
        url += "&height=" + Model.editor.config.size.height;

        if(Model.value.focalPoint != null){
            url += "&center=" + Model.value.focalPoint.top +"," + Model.value.focalPoint.left;
            url += "&mode=crop";
        }
    }
    
    <img src="@url" alt="@Model.value.caption">
    
    if (Model.value.caption != null)
    {
        <p class="caption">@Model.value.caption</p>
    }
}

﻿@model dynamic
@using Umbraco.Web.Templates

@if (Model.value != null)
{   
    var url = Model.value.image;
    if(Model.editor.config != null && Model.editor.config.size != null){
        url += "?width=" + Model.editor.config.size.width;
        url += "&height=" + Model.editor.config.size.height;

        if(Model.value.focalPoint != null){
            url += "&center=" + Model.value.focalPoint.top +"," + Model.value.focalPoint.left;
            url += "&mode=crop";
        }
    }

    var altText = Model.value.altText ?? String.Empty;
    
    <img src="@url" alt="@altText">
    
    if (Model.value.caption != null)
    {
        <p class="caption">@Model.value.caption</p>
    }
}

Fix for U4-10821, render alt text attribute from grid image editor, or empty string if null (for screen readers)
Fix for U4-10821, render alt text attribute from grid image editor, or empty string if null (for screen readers)
