Hi, im using the "replaceVariableByWordFragment" to replace image on header. This is my code
$imageLogo = new WordFragment($docx, 'defaultHeader');
$imageOptLogo = array(
'src' => $aImagenes['Logo_Empresa'],
'textWrap' => 0,
'height' => 50,
'width' => 50,
);
$imageLogo->addImage($imageOptLogo);
$docx->replaceVariableByWordFragment(array('Logo_Empresa' => $imageLogo), array('target' => 'header', 'type' => 'block'));
But when i open the generated file, the image is broken, if i use this image on document it's ok but when i use de header, doesn't work.
Thanks