1. Add a custom field with the type "File" to the deal/quote/invoice/etc. The field can be single and multiple.

2. Open the "DocDesigner" application, navigate to Settings, Documents. Scroll down the page and locate the section "CRM images".
Select the fields in which the pictures are stored. To select multiple lines, hold down the Shift key. The saving works automatically.
That's all :)
Variables are added to the document in the standard way.
Important: Images are output to the document "as is". Images are not scaled, so be sure to upload your images in the desired size and resolution.