Skip to content

Commit 400133b

Browse files
committed
getBiggerImage checks also the minImageWith and minImageHeight
1 parent 2310f32 commit 400133b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Embed/Adapters/Adapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public function getImage()
218218
if ($this->options['getBiggerImage']) {
219219
$image = $this->getBiggerImage(FastImage::getImagesSize($this->images));
220220

221-
if ($image) {
221+
if ($image && ($image['width'] >= $this->options['minImageWidth']) && ($image['height'] >= $this->options['minImageHeight'])) {
222222
$this->imageWidth = $image['width'];
223223
$this->imageHeight = $image['height'];
224224

0 commit comments

Comments
 (0)