prototype(Neos.NodeTypes:Image) {
    partialRootPath = 'resource://Newland.CityTheme/Private/Templates/NodeTypes/Partials'

    maximumWidth = 960
    hideCaption = ${q(node).property('hideCaption')}

    caption = Neos.Fusion:Case {
        hasCopyright {
            condition = ${!String.isBlank(q(node).property('image').copyrightnotice)}
            renderer = ${String.trim(String.stripTags(q(node).property('caption'))) ? q(node).property('caption') : q(node).property('image').caption + ' © ' + q(node).property('image').copyrightnotice}
        }
        fallback {
            condition = TRUE
            renderer = ${String.trim(String.stripTags(q(node).property('caption'))) ? q(node).property('caption') : q(node).property('image').caption}
        }
    }

    alternativeText = Neos.Fusion:Case {
        isImagePropertyCaption {
            condition = ${!String.isBlank(q(node).property('image').caption)}
            renderer = ${String.trim(String.stripTags(q(node).property('image').caption))}
        }
        fallback {
            condition = TRUE
            renderer = ${q(node).property('image').title}
        }
    }
}
