diff --git a/source/php/Component/Iframe/Iframe.php b/source/php/Component/Iframe/Iframe.php index ecdb1bd4..0b921c2b 100644 --- a/source/php/Component/Iframe/Iframe.php +++ b/source/php/Component/Iframe/Iframe.php @@ -31,15 +31,21 @@ public function init() } if (isset($src)) { - $this->data['attributeList']['src'] = $this->buildEmbedUrl($src); + $url = $this->buildEmbedUrl($src); + $this->data['attributeList']['src'] = $url; + + if (empty($poster)) { + $this->data['poster'] = apply_filters('ComponentLibrary/Iframe/Poster', $url); + } } if (isset($labels)) { $this->data['labels'] = json_encode($labels); } - if($poster) { + if(!empty($poster)) { $this->data['attributeList']['poster'] = $poster; + $this->data['poster'] = $poster; } $this->data['attributeList']['title'] = $title;