Skip to content

Commit e22ece8

Browse files
author
Hubert Miazek
committed
1 parent 4decaff commit e22ece8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/PhpWord/Writer/HTML/Element/Image.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,15 @@ public function write()
4141
$parentWriter = $this->parentWriter;
4242

4343
$content = '';
44-
if (!$parentWriter->isPdf()) {
45-
$imageData = $this->element->getImageStringData(true);
46-
if ($imageData !== null) {
47-
$styleWriter = new ImageStyleWriter($this->element->getStyle());
48-
$style = $styleWriter->write();
49-
$imageData = 'data:' . $this->element->getImageType() . ';base64,' . $imageData;
44+
$imageData = $this->element->getImageStringData(true);
45+
if ($imageData !== null) {
46+
$styleWriter = new ImageStyleWriter($this->element->getStyle());
47+
$style = $styleWriter->write();
48+
$imageData = 'data:' . $this->element->getImageType() . ';base64,' . $imageData;
5049

51-
$content .= $this->writeOpening();
52-
$content .= "<img border=\"0\" style=\"{$style}\" src=\"{$imageData}\"/>";
53-
$content .= $this->writeClosing();
54-
}
50+
$content .= $this->writeOpening();
51+
$content .= "<img border=\"0\" style=\"{$style}\" src=\"{$imageData}\"/>";
52+
$content .= $this->writeClosing();
5553
}
5654

5755
return $content;

0 commit comments

Comments
 (0)