Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
4088 Prikazi

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
Opusti
Avtor Best Answer

Finaly that worked form me:

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

Avatar
Opusti
Best Answer

Hi,

Please check this,

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

Thanks
Aswini iWesabe 
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
okt. 16
3746
1
maj 15
14019
1
jul. 25
1704
1
jul. 25
1931
1
maj 25
1691