WooCommerce import: Product Images Not Importing or Showing Broken URLs
?dl=0 to ?dl=1. For spreadsheets with pictures embedded directly inside Excel cells, saving as CSV drops all images entirely—extract them with CatalogDock into a SKU-linked image ZIP.Applies to the built-in WooCommerce CSV importer (Products → Import). Verified against WooCommerce 11.1.2 (on WordPress 7.1.2).
Which cause is yours?
| What you observe | Most likely cause |
|---|---|
| Products import successfully, but image thumbnails show broken placeholder icons | 1. Web preview share link (Google Drive / Dropbox) |
| Importer log reports "Unable to use image" or "Error getting remote image" | 2. 403 Forbidden / Anti-hotlinking / Cloudflare bot protection |
| Supplier provided an Excel file with photos, but exported CSV has empty Images column | 3. Embedded Excel cell pictures (OpenXML DrawingML) |
| Import freezes at row 20 or 50, server returns 504 Gateway Timeout or PHP fatal error | 4. Image processing & thumbnail generation memory exhaustion |
1. Cloud storage share links (Google Drive, Dropbox, OneDrive)
When you copy a share link from Google Drive or Dropbox, the link points to an HTML web page designed for human viewing, complete with navigation bars and preview UI.
The WooCommerce importer requires a direct HTTP/HTTPS link that streams the raw image bytes (e.g. image/jpeg or image/png). When WooCommerce downloads an HTML web viewer page instead of image data, the image parser rejects the file as corrupt.
Dropbox link conversion
Change the query parameter at the end of the URL:
- Incorrect (preview page):
https://www.dropbox.com/s/xyz123/product.jpg?dl=0 - Correct (direct download):
https://www.dropbox.com/s/xyz123/product.jpg?dl=1(orhttps://dl.dropboxusercontent.com/s/xyz123/product.jpg)
Google Drive link conversion
Extract the file ID from the sharing URL and use the direct export endpoint:
- Incorrect (preview viewer):
https://drive.google.com/file/d/1A2B3C4D5E/view?usp=sharing - Correct (direct stream):
https://drive.google.com/uc?export=download&id=1A2B3C4D5E
Note: Google Drive rate-limits download requests and prompts with a virus-scan confirmation screen for larger files, which can still cause automated WordPress downloads to fail. Dedicated image hosting or direct server storage is strongly recommended.
2. 403 Forbidden & CDN hotlink protection
If the image URL loads fine when you open it in your web browser, but WooCommerce fails to import it, the supplier's server or CDN is actively blocking automated download requests.
When WooCommerce downloads an image, it uses the WordPress HTTP API (wp_remote_get()) with a default User-Agent header like WordPress/6.7; https://yourstore.com and an empty or external Referer. Many e-commerce suppliers enable Cloudflare Bot Fight Mode or Apache hotlink protection to prevent competitors from scraping their media assets.
How to test if a supplier URL blocks WordPress
Run a quick cURL check in your terminal using the WordPress User-Agent:
curl -I -A "WordPress/6.7; https://example.com" https://supplier.com/images/12345.jpgIf the server returns HTTP/1.1 403 Forbidden, HTTP/1.1 401 Unauthorized, or a Cloudflare challenge page, WooCommerce cannot download the file.
Solutions
- Request whitelisting: Ask your supplier to whitelist your server IP address or allow the WordPress User-Agent.
- Batch upload to Media Library: Download the supplier image archive to your computer, upload them directly to WordPress via FTP (or Media → Add New), and reference the local URLs in your CSV.
3. Embedded Excel cell pictures (OpenXML DrawingML)
Suppliers frequently deliver product catalogs in Microsoft Excel (.xlsx) format with product photos pasted directly into table cells.
Because CSV is a plain-text format, clicking Save As → CSV in Excel deletes all embedded photos without warning. The resulting CSV has completely blank image columns because embedded DrawingML shapes cannot be represented as text.
How CatalogDock extracts Excel cell images
CatalogDock reads OpenXML DrawingML structures directly in your browser. It calculates the exact row coordinate of every embedded image, matches it to the corresponding product SKU, and packages all images into a structured ZIP file along with a manifest CSV linking each image filename to its product.
You can then upload the image folder directly to your WordPress media directory or WP-CLI without relying on slow external image scraping.
4. Timeouts & thumbnail generation memory exhaustion
Downloading an image is only the first step. When WooCommerce imports an image from a CSV URL, WordPress invokes the GD or Imagick PHP extension to generate 4 to 8 resized thumbnail variations for every single photo (such as woocommerce_thumbnail, woocommerce_single, woocommerce_gallery_thumbnail, medium, large).
If your supplier uses high-resolution 4000×3000px photos, processing 5 gallery images per product creates 35–40 resizing operations in memory for a single row. This causes PHP memory exhaustion (Allowed memory size exhausted) or a 504 Gateway Timeout.
How to prevent thumbnail timeouts
- Import in small, variation-safe batches: Keep imports under 500 records per file. CatalogDock automatically splits catalogs into safe batches while keeping parent products and their variations together.
- Disable thumbnail generation during import: Add a temporary snippet to your theme's
functions.phpto pause intermediate image sizes during the CSV import:
Once the import finishes, remove the filter and regenerate all thumbnails in the background using the WP-CLI command:add_filter('intermediate_image_sizes_advanced', '__return_empty_array');wp media regenerate --only-missing --yes.
Check your product files before importing
CatalogDock diagnoses image columns, validates CSV formatting, trims whitespace, and extracts embedded pictures from Excel files directly in your browser before you touch your live store.
Open the free checker →Runs in your browser · No files uploaded · Never connects to your store
Still failing?
Check the other guides in this series:
- "Invalid or duplicated SKU" — 4 causes, diagnostic table and fixes →
- "Variations not showing or linking" — 5 causes, order of rows and missing prices →
- "504 Gateway Timeout" & Execution time exceeded — 4 causes and safe batches →
- Delimiter & encoding issues — 4 causes, semicolon delimiter and UTF-8 fixes →