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
![](https://static.wixstatic.com/media/a27d24_8cd14a164ff8494b8c948dae5c3ac232~mv2.png/v1/fill/w_980,h_692,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/a27d24_8cd14a164ff8494b8c948dae5c3ac232~mv2.png)
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.
![](https://static.wixstatic.com/media/a27d24_7582fe4a9ada49658916dd5d4e47260e~mv2.png/v1/fill/w_238,h_205,al_c,q_85,enc_auto/a27d24_7582fe4a9ada49658916dd5d4e47260e~mv2.png)
these photos are on the database 'Photos" and are linked with the database 'MembersOk'
![](https://static.wixstatic.com/media/a27d24_b0c9eac6b2dc4ca890536c006de8031a~mv2.png/v1/fill/w_677,h_724,al_c,q_90,enc_auto/a27d24_b0c9eac6b2dc4ca890536c006de8031a~mv2.png)
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;
???
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?
yupp that's the way I would do it, not saying it's perfect
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?
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.