Add customer image to print format

how to add customer image to my custom print format in sales invoice
i tried
<img src="{{doc.customer_image}}">
but it didn’t work

from where are you printing? is the customer_image present in the document from where you are trying to print? if it is not in the same doc from where you are printing, you cannot simply refer it with doc.field_name, you’ll need to fetch it before you can refer it

from customer image field from customer list found in accounts module
accounts>customer>customer image

from which document are you clicking the print button?

provide screenshots so its easier to understand