Hi, i am trying to generate an Image Sitemap with the Standalone PHP Version. For some reason, the title attributes of the images on our site get converted to the <image:caption> tag instead of <image:title>.

Furthermore, if an image has a title- and an alt-attribute this results in the same image being tiwce in the sitemap, once with <image:caption> set to the title and once to the alt-attribute.

How can we get the titles get correctly set as <image:title>? Alt-tags should be ignored in my opinion, since Google does not mention it here:

[ External links are visible to forum administrators only ]

Please help!

Regards, Steffen
Re: Image Sitemap: no titles in Sitemap, everything is converted to caption
« Reply #1 on: November 30, 2018, 02:49:03 PM »
Hello,

both attributes are optional but you can modify generator/pages/mods/sitemap_xml_tpl.xml file if needed:
find:
Code: [Select]
<image:caption><TVAR caption></image:caption>replace with:
Code: [Select]
<image:title><TVAR caption></image:title>
Re: Image Sitemap: no titles in Sitemap, everything is converted to caption
« Reply #2 on: November 30, 2018, 04:58:05 PM »
Yes, but that sets the title to the caption. We sometimes have both, title and caption and they should appear both in the sitemap in the correct tag.

Can I use <TVAR title> in that template and how? For example I could adjust the template:

<image:title><TVAR title></image:title>
<image:caption><TVAR caption></image:caption>

Would that work?
Re: Image Sitemap: no titles in Sitemap, everything is converted to caption
« Reply #3 on: December 02, 2018, 04:25:12 AM »
Hello,

only one attribute is currently support, either "title" or "alt" is taken from <img> tag, whichever comes first in html code.