The %file()% command can be used to insert inline images into the email. In order to better control styling and other aspects, allow adding attributes and values as parameters. For example:
%file(img/bargain-upg-bf-de.png,id=bargainStar,width=192)%
This should be converted by SmartTemplates reading the image as bitstream and append the attributes, like this:
<img
src="data:image/png;filename=bargain-upg-bf-de.png;base64,iVBORw0KGgoAAAAN...." id="bargainStar" width="192">
If a string is appended without the "=" then it will be regarded as the optional "alt" argument.
%file(img/bargain-upg-bf-de.png,id=bargainStar,"save 40 per cent")%
becomes this:
<img
src="data:image/png;filename=bargain-upg-bf-de.png;base64,iVBORw0KGgoAAAAN...." id="bargainStar" alt="save 40 per cent">
This makes it easy to add style rules to add more control over layout.
The
%file()%command can be used to insert inline images into the email. In order to better control styling and other aspects, allow adding attributes and values as parameters. For example:This should be converted by SmartTemplates reading the image as bitstream and append the attributes, like this:
If a string is appended without the "=" then it will be regarded as the optional "alt" argument.
becomes this:
This makes it easy to add style rules to add more control over layout.