diff --git a/src/Plugin/DrupalDotOrgSourceBase.php b/src/Plugin/DrupalDotOrgSourceBase.php index 3679079930efb4287e0c9f49f4c69396b3cf259f..74a362459e5d4ae58fa0a5a6ace6cecde3a8d496 100644 --- a/src/Plugin/DrupalDotOrgSourceBase.php +++ b/src/Plugin/DrupalDotOrgSourceBase.php @@ -554,13 +554,15 @@ abstract class DrupalDotOrgSourceBase extends ProjectBrowserSourceBase implement if (is_array($project_images) && is_array($related)) { $images = []; foreach ($project_images as $image) { - $uri = self::DRUPAL_ORG_ENDPOINT . $related[$image['type']][$image['id']]['uri']['url']; - // Adapt the path as we are querying via www.drupal.org. - $uri = str_replace(self::DRUPAL_ORG_ENDPOINT . '/assets/', self::DRUPAL_ORG_ENDPOINT . '/files/', $uri); - $images[] = [ - 'file' => Url::fromUri($uri), - 'alt' => $image['meta']['alt'] ?? '', - ]; + if ($image['id'] !== 'missing') { + $uri = self::DRUPAL_ORG_ENDPOINT . $related[$image['type']][$image['id']]['uri']['url']; + // Adapt the path as we are querying via www.drupal.org. + $uri = str_replace(self::DRUPAL_ORG_ENDPOINT . '/assets/', self::DRUPAL_ORG_ENDPOINT . '/files/', $uri); + $images[] = [ + 'file' => Url::fromUri($uri), + 'alt' => $image['meta']['alt'] ?? '', + ]; + } } $project_images = $images; }