
Bulk Importing Google Images to Odoo Products or Product Variants
In my experience, Odoo will not import images based on a directory path. This means you need a remote URL for each image in order to do the bulk import.
I know there are more intricate and "proper" ways to do this programatically, with APIs, with scripts, etc. - but this is a quick & dirty.
Step 1: Create a folder on Google Drive & change permissions on that drive so anyone with the link can open it.

Step 2: Name your images to match the internal reference of the product. So, if the product internal reference is "widget-blue", name the image "widget-blue.png". Upload those images to your new Google Drive folder
Step 3: Create a Google Spreadsheet, then go back to your Google Drive folder and Ctrl+A (or Cmd+A) to select all of the image files. Once they're selected, click Ctrl+C (or Cmd+C) to copy. You can also use the Edit > Copy function of the browser, but to NOT right-click the files and make a copy, this won't work.
Step 4: Go to your spreadsheet and place your cursor where you want to paste the file data. Then, right-click in the cell and select Paste Special > Values Only

This should paste the filenames of each file.

Immediately after that, go to cell B1 and right-click > Paste. This gives adds the file names. They will paste as links, but that's fine.
Let's quickly get the filename without the extension. This should then match the product's internal reference, and we'll use it to bring the data together later.
Use this code in cell C1 and fill it down. If you used .jpg files, then substitute ".png" with ".jpg":
=SUBSTITUTE(B1,".png","")

Step 5: Now we need to convert the file link in column A to a URL that will play well with Odoo. The first step is to extract the image ID into its own cell. Do this using the following code in column D.
=regexextract(A1,"=([0-9a-zA-Z\-]+)")

In column E, you can build the URL using the following code:
="https://drive.google.com/uc?id="&D1

Step 6: We'll now have all of the data we need to match the image name and filename to the product or product variant. For this example, I'll use product variant records. I've gone to the product template, then clicked the Variant smart button.

Next, I'll select all variants and export them (Action > Export) with the Internal Reference field, being sure to select the "I want to update data (import-compatible export)" option. When I'm working in Google Sheets, I always export as CSV because its easier to import those records. However, you can do it as XLSX as well.

Import this date into a different tab on the same spreadsheet. This will give you the External ID (id) and Internal Reference. In column C, add the header:
- Images / Image if you're importing to the product.template (base product), which is done from the Products > Product view
- Variant Image if you're importing into the product.product (product variant), which is done from the Products > Product Variants view
Then, use an index/match or hlookup function in sheets to pull in the image URL based on a match between the internal reference and the image file name.
An example of the VLOOKUP formula would be as follows, where 'Sheet 2' is the sheet containing your image data:
=VLOOKUP(B2,Sheet2!$C$1:$E$4,3,false)
An example of the index/match formula would be as follows, where 'Sheet 2' is the sheet containing your image data:
=index(Sheet2!E:E,match(B2,Sheet2!C:C,false))
Next, remove the column header "internal reference" in B1, you won't need this moving foward.
This sheet is ready to export and import into Odoo! Remember that using Images / Image applies to product templates (product.template) and Variant Image / Image applies to product variants (product.product).

Step 6: Go to Odoo and import the records. Again, this example is for product variants.

Once imported, we can see that the main image for the product variant has been updated.
