Cant seem to find the correct syntax for this?
<img id='barcode' src="https://api.qrserver.com/v1/create-qr-code/?data="'+ ${var.membervar} + "'+&size=100x100" alt="" title="HELLO" width="50" height="50" />
You should let Thymeleaf know you want to parse the src attribute by using th:src. Something like this would work ...
<img id='barcode' th:src="'https://api.qrserver.com/v1/create-qr-code/?data='+ ${var.membervar} + '&size=100x100'" alt="" title="HELLO" width="50" height="50" />
But for the fully qualified URLs you should be using Thymeleaf Link Urls where proper encoding will be applied for all your query parameters. For example ...
<img id='barcode' th:src="@{https://api.qrserver.com/v1/create-qr-code/(data=${var.membervar},size='100x100')}" alt="" title="HELLO" width="50" height="50" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With