I tried both methods in my template,but the image doesn’t get replaced by anything though.
$docx = new CreateDocx();
$customerImageL = $customer->Id.'.jpg';
$docx->addTemplate('../../templates/Template.docx');
$docx->replaceHeaderImage('CustomerLogo', '../../templates/'.$customerImageL);
I set the Alt Text as $CustomerLogo$ in my template.
given below the log file
11/13/12 11:03:14,304 [4712] INFO phpdocx_logger - Create a temp file to use as initial ZIP file. DOCX is a ZIP file.
11/13/12 11:03:14,496 [4712] INFO phpdocx_logger - The language has been set.
11/13/12 11:03:14,523 [4712] INFO phpdocx_logger - Open template ../../templates/Template.docx.
11/13/12 11:03:14,527 [4712] INFO phpdocx_logger - Assign and replace image variable CustomerLogo in header.
Additionally, I tried to use your image example and it worked, so it is not a server problem