Image with alt

The standard image field produces a empty alt tag so I made a new “image with alt” using image_with_title as the basis.

The template property is has

img class=“img-fluid” src="[[+url]]" width="[[+width]]" height="[[+height]]" alt="[[+title:htmlent]]"

but CB always adds a BR to the title within the alt. How can I stop that?

Kind regards


I think MODX has a trim output modifier you could also use:


striptags does it – thanks for the pointer.

1 Like

3 posts were split to a new topic: Questions about image field