How to Import Images from Dropbox and Google Drive in WooCommerce

In this tutorial we will see how we can import images from Dropbox and Google Drive to host the images that we are going to use to import products in WooCommerce from a spreadsheet to be able to export it in CSV.

As you probably already know, you can add products in WooCommerce in 2 ways. Manually one by one or by importing them from an Excel document or a Google Drive spreadsheet.

When you are about to import products in batch thanks to the functionality of importing from a spreadsheet, you will encounter a problem How do I import the images?.

The first thing you have to know is that you DO NOT HAVE to add the image in the spreadsheet but you have to add the path or url to the image.

And this is where this tutorial will be very useful.

Since you have to add the path to the image, what you have to do is host the image from a cloud service.

In this tutorial I am going to tell you how to do it with Dropbox and Google Drive.

Video Tutorial

Subscribe to my channel:  

As we said, we are going to use Dropbox and Google Drive to do it.

How to Host Images in Dropbox to Import Them in WooCommerce

Dropbox is one of the most popular and recognized cloud services out there. In fact I use it for almost everything. If you don't have an account, you can create one for free from here

Once you have an account and upload the image you want to import to WooCommerce in Dropbox.

Once you upload the image, right-click on the image and click copy link:

screenshot of the options of a file hosted in dropbox. Pointing at the Copy Link option

The link that it gives us is not valid, now I will explain how to fix it but you will have a url like the following:

https://www.dropbox.com/s/z49y21c0t55qi29/muneca-nina.png?dl=0

The important part is the end of the URL ? dl = 0

you have to change it to ?raw=1 That is to say, the url must be as follows:

https://www.dropbox.com/s/z49y21c0t55qi29/muneca-nina.png?raw=1

Once you have the correct url, you just have to add it to your spreadsheet:

Google sheet with the url of the dropbox image

If you don't have the spreadsheet template you can find it inside the WooCommerce plugin directory that you can download from here.

The file can be found at sample-data folder and the file is called sample_products.csv.

Once we have our file prepared, we download it in CSV format and go to the WordPress desktop and within Products -> All Products we click on Import

WordPress screenshot importing a csv file of products

We follow each step of the importer and if nothing has happened we will be able to import the product and of course the images that we had hosted in Dropbox:

Screenshot of product import result in WooCommerce

In my example I was importing 2 products.

One of them had the image hosted on Dropbox and it imported perfectly.

The other product had the image hosted on Google Drive and this one has failed as you can see in the previous screenshot.

I have to admit that it took me hours to get it. Once you see the tutorial it will seem easy but I have sweated to get it 😅

How to Host Images in Google Drive to Import Them in WooCommerce

Although the Dropbox method has not worked for us, we have to do something similar to start.

The first thing we have to do is upload the image we want to Google Drive.

Once done we click on the right button on the image:

Image capture from Google drive, selecting a file and right-clicking to click Get Link

We will get another screen in which we have to select the permissions and we have to select Any Internet user with the link can view it. and then copy link.

The link that Google Drive returns will be similar to this:

https://drive.google.com/file/d/1oG-j9ifLENPBz1va_ONHkYEVwxB5fRed/view?usp=share_link

And we have to change it to something like this:

https://drive.google.com/uc?export=download&id=1oG-j9ifLENPBz1va_ONHkYEVwxB5fRed

If you see what I have done is copy the id of the image from the first link (1oG-j9ifLENPBz1va_ONHkYEVwxB5fRed) and paste it into the url below.

Now we copy this link into our spreadsheet just like we did with the Dropbox url.

Screenshot of Google Sheet selecting the path of an image hosted on Google Drive

If we are now going to try to import this file into WooCommerce we will see that it does not work for us 😥

To be able to import the products and therefore the images we need to use another method.

We are going to do it thanks to 2 plugins:

You can download WooCommerce Import Add-On Pro plugin and many morefrom our Premium Zone

WP All import is a plugin that allows us to import WooCommerce products with much more control. It's a wonderful plugin.

Once both plugins are installed we will see that we have a new option on our WordPress desktop.

We go to All import –> New Import and click on Load a file:

screenshot of WP All import on the upload a file screen

We upload our CSV file and when it asks us we mark that we want to import WooCommerce Products:

screenshot of wp all import selecting content type WooCommerce Products

On the next screen it shows us the fields that it has recognized and without touching anything we go to the next step:

Now we have to select each field that we want to import in its corresponding position.

That is, Add the title in the title, the description in the description and so on:

screenshot mapping import fields in all import

And of course, what has brought us to this tutorial, the images:

Mapping in wp all import the images to import them in the woocommerce products

Now we click on the next step and here we click on Auto-detect the Unique Identifier.

And now we click on Confirm and Execute the import:

screenshot to confirm and run the import in wp all import

And that's it, if you've gotten this far, you have your products imported with their images from Google Drive 🥳

Screenshot of wp all import import completed screen

Leave a comment