+ $previewPictureUrl = $content['url'];
+ } elseif (empty($previewPictureUrl)) {
+ $this->logger->debug('Extracting images from content to provide a default preview picture');
+ $imagesUrls = DownloadImages::extractImagesUrlsFromHtml($content['html']);
+ $this->logger->debug(\count($imagesUrls) . ' pictures found');
+ if (!empty($imagesUrls)) {
+ $previewPictureUrl = $imagesUrls[0];
+ }
+ }
+
+ if (!empty($previewPictureUrl)) {
+ $this->updatePreviewPicture($entry, $previewPictureUrl);