How to show images in qweb (odoo 11) ?
It is very simple to show static images in Odoo Qweb templates (viewes or reports).
For that you need to add your image inside static directory
Use below xml syntax to show
In case you want to use an image that isn't static, here's what you can do instead.
<img t-att-src="'data:image/png;base64,%s' % to_text(product_id.image_medium)"/>
Here the product_id is an object and image_medium is image field(binary).
Then as Odoo renders by default binary data as base64, you can simply append the content of the image after base64,.
Participate on our social stream.