Skip to Content
Menu
This question has been flagged
2 Replies
3075 Views

Hi, I have a binary field (widget: image) but neither oth the two method work:


<img t-if="p.plato_ids.icono" t-att-src="'data:image/png;base64,%s' % p.plato_ids.icono"/>

(appears empty square)

  

<span t-field="p.plato_ids.icono" t-field-options='{"widget": "image"}'/>

(appears:  iVBORw0KGgoAAAANSUhEUgAAAH gAAAB3C.............)


anyone knows any other method? Thank you

Avatar
Discard
Author Best Answer

Finaly that worked form me:

<img t-attf-src="data:image/*;base64,{{p.plato_ids.icono}}"/>

Avatar
Discard
Best Answer

Hi,

Please check this,

<img t-att-src="'data:image/png;base64,%s' % to_text(object.name)"/>

Thanks
Aswini iWesabe 
Avatar
Discard
Related Posts Replies Views Activity
0
Oct 16
2930
1
May 15
13004
0
Oct 24
118
1
Apr 24
972
7
Sep 24
22461