This question has been flagged

Hi!

I have a problem with this line.

<span  t-field="product.image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;img-rounded&quot;}"/>

 

Return is wrong, just an empty box shown.

The product image is correct in shop by list view.

I tried the followings.

(image_small, image_medium) nothing change.

I listed out the sourche the web will shown the image data as string as well.

I try diff. file formats, like png, bmp, jpg >> no change.

When I try this: It wiil be shown as well :

<img src="data:image/jpeg;base64,amF2YS5pby5GaWxlSW5wdXRTdHJlYW1AMTdlMDYwMA=="/>

It will be ok. (How can I put the product.image into the image data, {amF2....} unfortunatelly I am beginer in javascript...)

Best Regards

L.

 

Avatar
Discard

Try this. I have copy and pasted it from the shopping cart confirmation page.

Best Answer

Hi Klacus,

I can't seem to post code in the comments for some reason. Please see the following snippet:

<span t-field="line.product_id.image_small" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;img-rounded&quot;}"/>

Where exactly are you trying to place the image? Is it on a product page, on an order line or some other placement?

Avatar
Discard

Hi. I put the image into the product_template image, and image_small, and image_medium. Originally I upload the image in the Product form. (In the list on webshop it 's ok, shown as well. Inside the system also ok, in the Kanban, and in the form view) That's why I don't understand the situation...

Hi Klacus, I'll look into this and post back if I find anything that might help.

Author

Hi Luke. THX.

Author Best Answer

Hi Luke, Can you try again?


 

Avatar
Discard