Hello,
/wp-content/plugins/complete-image-sitemap/complete-image-sitemap.php on line 73PHP message: PHP Warning
PHP 8.0
]]>Howdy! First time trying the plugin and ran into very minor thing. Our newsroom is in sub folder e.g.,
site.ooo/news
but then we also have all our services in
site.ooo
so, with the two installs of WordPress, the file overwrites one another. An option to set a filename, or root path for writing would be super useful.
e.g.,
Set relative path /root/news/image-sitemap.xml
Thanks! ??
]]>Hi,
How does this Sitemap is created? Is there some condition like only images of these file type or some sections are included?
I generated the sitemap https://smallbusinessweb.co/sitemap-images.xml but not all images in homepage is included by the plugin. For example, the Below image(Image link provided) which is used in the footer is ignored.
https://smallbusinessweb.co/wp-content/uploads/2022/08/certificactions-sbw.png
Also, the <loc> tag uses Page ID in the slug instead of the page name like below. Is this correct or it should have page-slug instead of page-id?
]]>Herbert, waarom ziet Google Webmaster tools maar 30 afbeeldingen in de sitemap terwijl er veel meer staan? /sitemap-images.xml
//Edit, ik snap het al, hij ziet alleen de pagina’s waar de images op staan ??
]]>Hi
I am using your plugin and it works very well in general.
however In my search console I found out that some images
are being indexed from “draft” posts (or posts from trash) which is not good
The best practice here is of course to index only “publish” status of posts.
can you check it and update if there is a fix for that?
thanks
The image sitemap was generated successfully.
You can find the file here: https://www.something.nl/sitemap-images.xml
But i get a 404, and nothing in my root dir.
]]>This is wrong:
if(!empty($permalink)) {
foreach( array_keys($imgurls) as $imgurl ) {
$xml .=
"<image:image>" .
"<image:loc>" .$imgurl ."</image:loc>" .
$license .
"</image:image>";
}
$xml .= "<url><loc>" .remark_escape_xml_entities($permalink) ."</loc>" .$img ."</url>\n";
}
It should be:
if(!empty($permalink)) {
$img = '';
foreach( array_keys($imgurls) as $imgurl ) {
$img .=
"<image:image>" .
"<image:loc>" .$imgurl ."</image:loc>" .
$license .
"</image:image>";
}
$xml .= "<url><loc>" .remark_escape_xml_entities($permalink) ."</loc>" .$img ."</url>\n";
}
]]>
Hi Herbert,
I found a bug.
Our blog is installed on a subfolder:
https://www.twinword.com/blog
so after clicking the button “Generate a Complete Image Sitemap”, it shows:
“You can find the file here: https://www.twinword.com/blog/sitemap-images.xml”
However, that is a 404 because it was actually saved to:
https://www.twinword.com/sitemap-images.xml
To fix it, I just changed the following:
// A bunch of images were written to the sitemap file
$url = get_bloginfo('url') .'/sitemap-images.xml';
To:
// A bunch of images were written to the sitemap file
// blog url is not where it is saved, it is saved to doc root, so need to edit
$url = parse_url(get_bloginfo('url'));
$url = $url['scheme'].'://'.$url['host'].'/sitemap-images.xml';
Hope this helps.
]]>