'How to get Google Images to pick up image titles from Hugo website when using Shortcodes?
I have a Hugo v0.74.3 home run website and it has some pictures on it.
I declare these pictures in the markdown as shortcodes, i.e.
{{<figure src="./media/trng-dilemma.png"
title="The TRNG dilemma."
alt="The TRNG dilemma: Are any true random number generators really random given the stakes and circumstances?" >}}
which Hugo converts to the following HTML:-
<figure>
<a href="http://192.168.1.70:1313/media/trng-dilemma.png" data-featherlight="image"><img src="./media/trng-dilemma.png" alt="The TRNG dilemma: Are any true random number generators really random given the stakes and circumstances?"></a>
<figcaption>
<h4>The TRNG dilemma.</h4>
</figcaption>
</figure>
And it all renders correctly :-) But you see that the title text is now a figcaption. So the problem: Google Images displays that image as:-
It has not picked up the figcaption at all. Despite Google stating that they suck up figcaptions. Neither the alt text. It's actually displaying the website main title:part of the meta description and home URL. And Google does that for all of my images anywhere on the site :-(
This seems to be the intended behaviour, but it doesn't seem right to me as part of the site's informatics gets lost.
Q: How can I get my image title to be displayed by Google Images?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

