Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picture in News Sitemap #92

Celine35 opened this issue Feb 1, 2018 · 2 comments


Copy link

commented Feb 1, 2018


We generated a txnews sitemap for Google news, but we noticed that pictures of news doesn’t appear in the Google news newsfeed.
I looked into the code of extension dd_googlesitemap and I see media file is not provided in the sitemap structure.

Maybe other users would be interested with this feature.

Thank you in advance for your interest.

Best regards


This comment has been minimized.

Copy link

commented Feb 2, 2018


if you would add these lines to /Classes/Renderers/NewsSitemapRenderer.php News-Extension could submit image data:

line 72:
public function getStartTags() { return '<?xml version="1.0" encoding="UTF-8"?>' . chr(10) . '<urlset xmlns="" ' . 'xmlns:news="" ' . 'xmlns:image="" ' . '>' . chr(10); }

line 91:
public function renderEntry($url, $title, $lastModification = 0, $changeFrequency = '', $keywords = '', $priority = '', $image = '') {

line 105:
$content .= '</news:news>';
// Image
if ($image) {
$content .= 'image:image';
$content .= 'image:loc' . $image . '</image:loc>';
$content .= '</image:image>';
$content .= '';

$image should be the absolute image uri (string). Or as an array to submit more than one single image.

Best Regards


This comment has been minimized.

Copy link

commented Feb 3, 2019

How would be $image passed to renderEntity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.