Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
4077 Visninger

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
Kassér
Forfatter Bedste svar

Finaly that worked form me:

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

Avatar
Kassér
Bedste svar

Hi,

Please check this,

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

Thanks
Aswini iWesabe 
Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
okt. 16
3740
1
maj 15
14018
1
jul. 25
1688
1
jul. 25
1917
1
maj 25
1675