Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasvielmetter committed Jul 15, 2017
1 parent fce5494 commit 3beee5d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/WrkLst/DocxMustache/DocxMustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,10 @@ protected function InsertImages($ns, &$imgs, &$rels_file, &$main_file)
{
$docimage = new DocImage();
$allowed_imgs = $docimage->AllowedContentTypeImages();


$image_i = 1;
//iterate through replacable images
foreach ($imgs as $k=>$img) {
$this->Log('Merge Images into Template - '.round($image_i/count($imgs)*100).'%';
$this->Log('Merge Images into Template - '.round($image_i / count($imgs) * 100).'%');
//get file type of img and test it against supported imgs
if ($imgageData = $docimage->GetImageFromUrl($img['mode'] == 'url' ? $img['url'] : $img['path'], $img['mode'] == 'url' ? $this->imageManipulation : '')) {
$imgs[$k]['img_file_src'] = str_replace('wrklstId', 'wrklst_image', $img['id']).$allowed_imgs[$imgageData['mime']];
Expand Down

0 comments on commit 3beee5d

Please sign in to comment.