I need to download all the media from my shopify website. How can i do that?

I know how to download all the pictures link by link, but i need to bulk download all the pictures i loaded on the website in one move. For backup purpose. Is that possible?

@francesco4 let me go full SuperSayan on this:

  • Go to Settings → Files
  • Adjust the URL to /admin/settings/files?limit=250 (this will show 250 files per page instead of 50)
  • Open up your browser console
  • Paste in the following scripts in there, this will offer you a file with all the names of the files on that specific page
function downloadFileList() { var assets = $("#assets-table input[type=text]") assets.each(function (index, input) { var filename = input.value.split('?')[0]; files.push(filename); }); downloadFile(); } function downloadFile() { var downloader = $("") var data = 'data:application/octet-stream;base64,' + window.btoa(files.join("\n")); $('body').append(downloader) $('#download-generated-file').attr('href', data); $('#download-generated-file')[0].click(); } var files = [];downloadFileList();​
  • Do this manually for each page with files and combine them all in one big file with all the filenames you want to download

Let’s say the filename is now files-list.txt. Copy this to a specific folder on your computer. Now we want to get every file in this file automatically.

  • Open up your terminal
  • Navigate to that specific folder you just created
  • Execute this command: wget -i files-list.txt (requires wget)

You now have a folder with all the files and images from this Shopify websites files folder.

Boakashaa!

Enjoy mate!
Aivis Zvezdovs / ANTI 404

Labdien!
Å odien mēģinu izpildÄ«t JÅ«su augstākminēto darbÄ«bu, lai tiktu pie visiem SHOPIFY failiem, diemžēl man neizdodas, iekopējot scriptu parādās sekojoÅ”s teikums:

Uncaught SyntaxError: Unexpected identifier

Vai varat kā palīdzēt?

Paldies!

Hey @francesco4 @Zvezdovs and @DainaRozenberga

Renars here from Matrixify app.

In the Matrixify app, we have now developed the ability to export Shopify File details such as public links.

You can use the app exported links to bulk download files using the terminal/command prompt. Here we even have a great tutorial on how to do just that - Download all files from Shopify Files to your computer.

If you have any questions or issues along the way, you can always reach out to our support directly.

Sveiki @DainaRozenberga ,

Renārs Ŕeit no Matrixify app.

Matrixify aplikācijā ir pieejama iespēja eksportēt Shopify Files informāciju un datus, piemēram, publikās saites.

Šo aplikācijas funkcionalitāti lai eksportētās saites var izmantot lai lejupielādētu failus izmantojot datora terminal/command prompt.
Šeit var atrast mūsu pamācības lapu kā to izdarīt - Download all files from Shopify Files to your computer.

Ja jums ir kādas neskaidrÄ«bas vai problēmas ejot caurti Å”im procesam, varat sazināties ar mÅ«su palÄ«dzÄ«bas komandu.

Tried your script. Produces the following error in Firefox console.

Uncaught SyntaxError: unexpected token: identifier

@Zvezdovs Tried the script. thank you.

Produces the following error in Firefox console.

Uncaught SyntaxError: unexpected token: identifier

Looking up this error, found that this could be a missing ;

Your thoughts?

Dob’t use code, Try Filetastic. It lets you browse all files from your store nicely grouped into folders, and you can bulk download them too

We created a free Shopify app that allows you to download all your files in one click, compressed to a zip archive.

It’s called Filey, check it out.

Feel free to reach me out with feedback, or functionality requests.
Leaving a review is much appreciated.

Here’s an updated link for Filey

So easy! Thanks Mashkovtsev.

Amazing plugin, makes dev work so easy :slightly_smiling_face:

Hi there,

I tried your app and it worked great however it didn’t download the header images I have in my shop. Any idea why or how I can do it? thank you

Today i tried to find similar solution but nothing worked I developed a js file which will print all files name in console

// Function to extract all file URLs from the table
function getAllFileUrls() {
  const table = document.querySelector('.Polaris-IndexTable__Table'); // Locate the table
  if (!table) {
    console.error('Table not found!');
    return;
  }

  // Select all `img` elements in the table
  const imgElements = table.querySelectorAll('img');
  const fileUrls = [];

  imgElements.forEach(img => {
    const url = img.getAttribute('src');
    if (url) {
      fileUrls.push(url); // Add URL to the array
    }
  });

  console.log('File URLs:', fileUrls);
  return fileUrls;
}

// Call the function and log the URLs
getAllFileUrls();

If someone stumbles on this thread. Here is a slightly modified version of Arif’s above script which works with video assets also and gets the most master asset.

Does not work with mp3 or ā€œotherā€ types of files

It will also automatically start a download of the files to your computer. Hope it helps someone!

function getAllFileUrls() {
  const table = document.querySelector('.Polaris-IndexTable__Table'); // Locate the table
  if (!table) {
    console.error('Table not found!');
    return;
  }

  // Select all `img` elements in the table
  const imgElements = table.querySelectorAll('img');
  const fileUrls = [];

  imgElements.forEach(img => {
    const row =  img.closest('.Polaris-IndexTable__TableRow')
    const fileType = row.querySelector('.Polaris-Text--root.Polaris-Text--bodyMd.Polaris-Text--subdued').innerHTML.toLowerCase()  
    let url = img.getAttribute('src');
    if (url) {
      const video = extractImageID(url);
      if(video) {
       url = `https://cdn.shopify.com/videos/c/o/v/${video}.${fileType}`  
      } else {
          url = url.replace("_200x200", "");   
      }
      
      fileUrls.push(url); // Add URL to the array
    }
  });

  console.log('File URLs:', fileUrls);
  return fileUrls;
}

function extractImageID(url) {
  let match = url.match(/\/preview_images\/([^/]+)\.thumbnail/);
  return match ? match[1] : null;
}

async function downloadFile(url) {
  try {
    const response = await fetch(url);
    const blob = await response.blob();
    const link = document.createElement("a");

    // Use the last part of the URL as the filename (before query string)
    link.href = URL.createObjectURL(blob);
    link.download = url.split("/").pop().split("?")[0];
    document.body.appendChild(link);
    link.click();
    document.body.removeChild(link);
    URL.revokeObjectURL(link.href);
  } catch (error) {
    console.error("Failed to download file:", error);
  }
}

// Utility function to add a delay
function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

async function downloadAllFiles() {
  const urls =   getAllFileUrls()
  for (const url of urls) {
    await downloadFile(url);
    await sleep(500); // Add a 500ms delay between downloads to avoid blocking
  }
}

downloadAllFiles();

Hello, Thank you for share your code that is fine.

We have developed a shopify backup all which backup files and allow to export and then import in new site. You can try if you want it https://apps.shopify.com/syncora-backup-restore

Hi Francesco, I hope you are well :slight_smile:

Our CS - Export Product Images app is implemented for this purpose. You can export all the product images or filter by vendor, collection, creation date, or product status. You can also download all the images in a single folder or separate them by product.

Here you can find the how-to video: https://www.youtube.com/watch?v=8vDNby3YzYM

Incase you need further assistance or have any other questions we will be happy to help, you can send email to us or contact live support from the app dashboard.

Have a great day!