Display product images in a Table in Print Designer

Hi Guys,

So i have created a quotation Layout in Print designer and have added a table to show the Items in the quotation. I would like to add a product image however i have been unable to display an image. Is this possible.

By using {{row.image}} in a text Field that allows Jinja, I can display a Url to the Image but using img Src doesnt display that link. Im just looking for it to display the product image. Any Ideas?

@frogfootdxb
you can try this

{%- for item in doc.items -%}
		<tr>
		    <td>
		        {% set itm_doc = frappe.get_doc("Item", item.item_code) %}
		        <image src='{{itm_doc.image}}'>
		    </td>			
		</tr>
{%- endfor -%}

@jk_09 @frogfootdxb not required i have added option for image fields in table (v1.3.2) .

1 Like

@frogfootdxb @maharshivpatel
:smile:
then this work fine right

{%- for item in doc.items -%}
		<tr>
		    <td>
		        <image src='{{item.image}}'>
		    </td>			
		</tr>
{%- endfor -%}

@jk_09 check the video in this PR : fix: table and refactor updating dynamic data by maharshivpatel · Pull Request #288 · frappe/print_designer · GitHub

1 Like

so sorry :upside_down_face:
print designer ! right, no need

Yep Just checked. adding a column and ticking show hidden fields allows you to add Image view. This then displays the product image. :+1:

1 Like

Hi,
While we use the Image View column in our Quotation/Invoice/RFQ print formats, only the jpg images are supported. i.e. if the image attached to the item master is in jpg format then it shows in IMAGE VIEW column and if it is in webp/png/jpeg format, the images doesn’t show in the the pdf document. However, all the images are visible while we are creating/editing the print format.
Can you advise if there is anything missing from our end???