Hi
I couldn't find any other posts stating this error, but when we try to create a docx, sometimes an image makes an exception:-
```
array:1 [ "e" => Exception {#2290 #message: "Division by zero" #code: 0 #file: "/mnt/storage/standout/public_html/dev/public/phpdocx/classes/PhpdocxLogger.php" #line: 51 trace: { /mnt/storage/standout/public_html/dev/public/phpdocx/classes/PhpdocxLogger.php:51 { PhpdocxLogger::logger($message, $level) … ›if ($level == 'fatal') {
›throw new Exception($message);
›}
}
```
But all the values in the image are greater than zero, in fact they are ["Width"]=> int(2048) ["Height"]=> int(1366) and we force the image width to be 295.
The code is:
```
$image_options = [
'height' => ($room_photograph->Height / $room_photograph->Width) * $image_width,
'src' => $room_photograph->MediaURL,
'imageAlign' => 'center',
'textWrap' => 0,
'width' => $image_width,
];
```
Any ideas on how to fix this issue?
Thanks in advance
Carl.