diff --git a/vendor/magento/module-sitemap/Model/Sitemap.php b/vendor/magento/module-sitemap/Model/Sitemap.php --- a/vendor/magento/module-sitemap/Model/Sitemap.php +++ b/vendor/magento/module-sitemap/Model/Sitemap.php @@ -576,7 +576,9 @@ foreach ($images->getCollection() as $image) { $row .= ''; $row .= '' . $this->_escaper->escapeUrl($image->getUrl()) . ''; - $row .= '' . $this->escapeXmlText($images->getTitle()) . ''; + if ($image->getTitle()) { + $row .= '' . $this->escapeXmlText($image->getTitle()) . ''; + } if ($image->getCaption()) { $row .= '' . $this->escapeXmlText($image->getCaption()) . ''; }