Selfhost - Embedded documents not generated on Invoice PDF


I have selfhosted version 4.5.17
Under settings-> Invoice Design -> Invoice options, I have Embed documents option enabled.

But when I try to send invoice email with some image (jpg) files, these are not embedded into PDF.
Under preview page I see that image, but after using “Send invoice” button email is received with PDF attached, but it doesn’t have that image embedded.
If use “Download” button on invoice, PDF that I get downloaded contains that image.

Any ideas why email sent PDF doesn’t contain images. Any logs, options that needs to be checked?

PHP 7.3.11
Hosted on Azure webapp

I think it could be a bug, feel free to create an issue on the GitHub repo