Skip to content

Commit e9303bb

Browse files
committed
Fixed "getBiggerImage" option
1 parent e6fe9c0 commit e9303bb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Embed/Adapters/Webpage.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,20 @@ public function getImages () {
5757
continue;
5858
}
5959

60-
if ($this->options['getBiggerImage']) {
61-
$imgs = FastImage::sortImagesBySize($imgs);
62-
}
63-
6460
foreach ($imgs as $imgs) {
6561
if (!empty($imgs)) {
6662
$images[] = $this->Url->getAbsolute($imgs);
6763
}
6864
}
6965
}
7066

71-
return array_unique($images);
67+
$images = array_unique($images);
68+
69+
if ($this->options['getBiggerImage']) {
70+
$images = FastImage::sortImagesBySize($images);
71+
}
72+
73+
return $images;
7274
}
7375

7476
public function getProviderIcons () {

0 commit comments

Comments
 (0)