The current version of phpdocx can¡t add the alt image using addImage method, so I recommend you to add a simple placeholder and use replaceTemplateVariableByHTML to replace it using an image.
Or change the code as you've done :).
Regards.
🏷️ Limited Offer: 25% OFF 🏷️
First 100 purchases only — Special discount!
Use this coupon on checkout: PHPDXPJ_D1SC1N5T
Get it now