Emails and (devexpress) reports with "embedded" images

  • 18 December 2020
  • 1 reply

Userlevel 3
Badge +8


Currently we write a html(body) file as the actual email - where we for example want to have a company logo embedded in the email.  (as in <img src=”...”>). Then we start the smtp_connector and use this html(body) as input. For DevExpress this a html(body) content that is provided from a view column. (Which in turn will generate a pdf report with the image embedded).

Can you share your best practice for this and how you have implemented these embedded images?

(i.e. use an external website (and how do you serve/upload the picture?) or use CID or base64 or ???)



ps. The email variant will not embed the picture due to the location of the <img src=”\\somelocalserver\picture.png”>, the DevExpress report will work just fine. changing the location of the picture to say for example (as you do for your emails) will surely work for emails but I haven’t checked if this would work for DevExpress reports


Best answer by Mark Jongeling 2 February 2021, 16:51

View original

1 reply

Userlevel 7
Badge +23

Hi Ricky, 

The method that is commonly used is converting a varbinary string to a base64 string and then using <img src=data:image/png;base64, ...> inside a HTML field in DevExpress. This way you can save png files in the database as varbinary strings and use them inside DexExpress reports as pictures.

Kind regards,
Mark Jongeling