I am uploading hundreds of images to my wix space :
im_0001.jpg
…
im_0500.jpg
I would like to display a gallery with these images.
I am linking my gallery to a database which I imported from a .csv. I am successfully linking the title and description fields but I’m failing to link to the image source.
I would have hoped to be able to programmatically write something like
wix/im_0001.jpg
…
wix/im_0500.jpg
Actually, even entering by hand this url in the image source field is problematic: the image gets displayed only when the image gets clicked. It is not displayed when scrolling the unopened gallery.
Ideally I would have filled a .csv file with the addresses of the uploaded images. Is it possible ?
If not, is it possible to run some wix code to generate a gallery and access programmatically uploaded images ?
Thank you for your reply., @givemeawhisky . I am wondering if after/when I upload the images to the media manager, if there is a way to get the urls, without copying each url from the media manager and then pasting it into the database. Right now this seems to be the fastest way to put hundreds of images into a database.
I can’t upload the images with the rest of the data in csv file. Any ideas?
manually add all your images from the wix media space (using shift you can click an arbitrary large number of images)
in the console type the following:
$w.onReady(function () {
let items = $w(“#gallery1”).items;
for (var i = 0; i < items.length; i++) {
let type = items[i].type;
let src = items[i].src;
let description = items[i].description;
let title = items[i].title;
let link = items[i].link;
console.log(src)
}
});
(make sure that you gallery is called gallery1, and if you want to print more properties simply add console.log(type), console.log(title) for example)
preview the page and in the log you should see a list of all the URLs that you can manually copy-paste and handle yourself