We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09319dc + 0567deb commit 6c26acfCopy full SHA for 6c26acf
src/Providers/OEmbed.php
@@ -183,16 +183,15 @@ public function getImagesUrls()
183
$images[] = $this->bag->get('url');
184
}
185
186
- if ($this->bag->has('image')) {
187
- $images[] = $this->bag->get('image');
188
- }
189
-
190
- if ($this->bag->has('thumbnail')) {
191
- $images[] = $this->bag->get('thumbnail');
192
193
194
- if ($this->bag->has('thumbnail_url')) {
195
- $images[] = $this->bag->get('thumbnail_url');
+ foreach ([ 'image', 'thumbnail', 'thumbnail_url' ] as $type) {
+ if ($this->bag->has($type)) {
+ $ret = $this->bag->get($type);
+ if (is_array($ret)) {
+ $images = array_merge($images, $ret);
+ } else {
+ $images[] = $ret;
+ }
196
197
198
return $images;
0 commit comments