Hello,
The title attribute is a caption value, not the alternative text:
http://officeopenxml.com/drwPic-nvPicPr.php
The id is an integer and specifies a unique identifier. The name is a string and typically stores the original file name. The title is a string that specifies the caption. The descr is alternative text used for assistive technologies which do not display the picture.
We think the user hasn't added the alt text to the correct place.
If you need to customize Word contents/attributes, you can use customizeWordContents (https://www.phpdocx.com/api-documentation/docxcustomizer/customize-docx-Word-documents-PHP). As descr isn't one of the supported attributes, you need to use the customAttributes option and the same XPath query than the one used to get the images.
Maybe the easiest solution for your case is allowing both attributes to be used with replacePlaceholderImage. If you edit CreateDocxFromTemplate.php, and go to the Image4Image method, you can find this line:
if ($domImages->item($i)->getAttribute('descr') == self::$_templateSymbol . $variable . self::$_templateSymbol && $imageCounter == 0) {
that can be replaced by:
if (($domImages->item($i)->getAttribute('descr') == self::$_templateSymbol . $variable . self::$_templateSymbol || $domImages->item($i)->getAttribute('title') == self::$_templateSymbol . $variable . self::$_templateSymbol) && $imageCounter == 0) {
We have forwarded the topic to the dev team to be checked and include the same change to the stable release.
Regards.