SEO for images on Gallery connected to a database?

Hi all, I have a gallery that retrieves the images connected to a second database only for images.

I want these images to have a Unique SEO, what should I do?

here is my site and the images I want to have the SEO on
https://www.whohairyou.com/MembersOk/Tracy-Dockery


these images are retrieved on a second database and I use a reference to link with the first database. The question is that I do not Know how to set an ‘Alt Text’ for these images 'cause at the moment are not found on Google.


these photos are on the database 'Photos" and are linked with the database ‘MembersOk’


Should I create a field next to each image called ‘Alt Text’ and set to each image and then write a code on the page using something like that?

$w(“#dynamicDataset”).onReady( () => {
let altText = $w(“#dynamicDataset”).getCurrentItem().altText;
???

let dataItem = $w(" #dynamicDataset “).getCurrentItem();
let items = $w(”#myGallery").items;
items.forEach((item) => {
item.description = dataItem.altText // Or whatever description you want to set
item.title = ataItem.altText // Or whatever title you want to set
});
$w(“#myGallery”).items = items;
That way you can modify the images and the title and description will be used in Wix for SEO I am quite sure.

Oh Andreas thanks a million!
So in order to make this code work I should create a field called “description” into the database of photos as well right?

so after adding this code I should add the description and the title on the database next to each image right?

yupp that’s the way I would do it, not saying it’s perfect


i’m having these errors, what should I fix?

Maybe because I need to fill all the information on the database that are empty now?