Don't render an image caption if the field "image caption" is empty in the backend
By default, the html for the image caption is always rendered, even if no image caption is entered in the backend. This is really annoying. If you give padding and background-color to the caption via CSS empty captions are displayed as some kind of colored bar under the image.
To avoid this set the following Typoscript to your template
tt_content { image.20.rendering.div.caption.required = 1 }
This is the HTML5 version in case you use "figure" and "figcaption" instead of divs
tt_content { image.20.rendering.figure.caption.required = 1 }











