Skip to content

Instantly share code, notes, and snippets.

@dimaip
Created September 28, 2016 14:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimaip/81f7977040636aecd22a2c8f4d4681eb to your computer and use it in GitHub Desktop.
Save dimaip/81f7977040636aecd22a2c8f4d4681eb to your computer and use it in GitHub Desktop.
Handy way to show dummy image if no image is selected
prototype(Sfi.Site:ImageUri) < prototype(TYPO3.TypoScript:Case) {
image {
condition = ${asset}
renderer = ImageUri {
asset = ${asset}
width = ${width}
height = ${height}
maximumWidth = ${maximumWidth}
maximumHeight = ${maximumHeight}
allowCropping = ${allowCropping}
allowUpscaling = ${allowUpscaling}
}
}
dummyImage {
condition = ${site.context.inBackend}
renderer = TYPO3.TypoScript:ResourceUri {
path = 'resource://TYPO3.Neos/Public/Images/dummy-image.svg'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment