using external images to display images in a folder

. asked 3 years ago

hi

i have a presale question. i have over 5000 photos for all my products on my site (i have around 2.5k products plus variations) on my cdn all the images are in folders which are named exactly as the sku. is there a way i can link the folders to product gallery so it shows those pictures inside that folder or will i have to specify the url of each image?

the problem i am having is if i am not able to link the folder to show the photos i will have to create a csv with a link to all the seperate images which will be very time consuming. what is the best way to tackle this issue?

thanks

2 Answers
Dave Hilditch Staff answered 3 years ago

The CDN will be configured with HTTP not FTP, so it won’t be possible to list the contents of the folders.

Instead, you can quickly generate a CSV file for your folder structure. If you can SSH to your CDN, then you can use some linux commands:

https://unix.stackexchange.com/questions/208499/get-a-csv-file-containing-names-of-files-within-a-directory

Otherwise, you can download your images to your local computer and then use a command on your computer to generate the list of folders (SKUs) to files:

https://superuser.com/questions/744677/create-xls-or-csv-from-file-names-in-folder-on-windows

Once you have this info in a text file, you can use Excel or Google Sheets to pick out the SKU from the folder name into a separate column and concatenate the image names into a single row.

Presumably you have some process that’s actually depositing these images into these folders? Maybe you can tap into that process and have it also write rows to a CSV file, one row per SKU with pipe separated image paths.

Let me know if you need further help with this.

Dave Hilditch Staff answered 3 years ago

The CDN will be configured with HTTP not FTP, so it won’t be possible to list the contents of the folders.

Instead, you can quickly generate a CSV file for your folder structure. If you can SSH to your CDN, then you can use some linux commands:

https://unix.stackexchange.com/questions/208499/get-a-csv-file-containing-names-of-files-within-a-directory

Otherwise, you can download your images to your local computer and then use a command on your computer to generate the list of folders (SKUs) to files:

https://superuser.com/questions/744677/create-xls-or-csv-from-file-names-in-folder-on-windows

Once you have this info in a text file, you can use Excel or Google Sheets to pick out the SKU from the folder name into a separate column and concatenate the image names into a single row.

Presumably you have some process that’s actually depositing these images into these folders? Maybe you can tap into that process and have it also write rows to a CSV file, one row per SKU with pipe separated image paths.

Let me know if you need further help with this.

Your Answer


Super Speedy Plugins
Logo