k-sync
Back to blog

How to keep product images when migrating from WooCommerce to Shopify

Product images hosted on WooCommerce will break after migration if you don't plan ahead. Here's how to preserve every image, avoid 404s, and ensure your Shopify store looks as good as your WooCommerce store on day one.

·By Krokanti
5 min read · 981 words

One of the most painful surprises in a WooCommerce to Shopify migration is the image problem. Everything looks fine in your migration tool — titles, prices, descriptions all transfer cleanly. Then you open your new Shopify store and half the product images are broken.

Here's why it happens and exactly what to do about it.

Why WooCommerce images break in Shopify

WooCommerce stores product images on your WordPress server — typically at paths like:

https://yourstore.com/wp-content/uploads/2024/01/blue-sneakers.jpg

When you migrate products to Shopify, the image URLs in your product data still point to your old WordPress server. Shopify doesn't automatically download and re-host these images — it just stores the reference URL you gave it.

This means:

The 4 approaches to image preservation

Option 1: Let Shopify fetch and re-host images (recommended)

When you push products to Shopify via the Admin API, Shopify automatically downloads image URLs and re-hosts them on its own CDN. This is the cleanest solution — you don't need to do anything extra.

The key requirement: your WooCommerce images must be publicly accessible at the time of migration. Shopify will fetch each image URL during the product create/update call and store a copy on its CDN (serving from cdn.shopify.com).

After migration, your product images will be served from Shopify's CDN permanently, regardless of what happens to your old server.

Best for: Most migrations where WooCommerce is live during migration.

Option 2: Keep WooCommerce running temporarily

If you're migrating via CSV import (rather than the API), Shopify won't auto-fetch images — it stores the URLs as-is. In this case, keep your WooCommerce/WordPress installation running for at least 30–60 days after migration, until you've confirmed all images have been properly indexed by Shopify.

You can use WordPress plugins like "Redirect Old Slugs" or nginx redirect rules to handle URL changes, while keeping the image serving infrastructure live.

Best for: CSV-based migrations where you control the timeline.

Option 3: Mirror images to a CDN (Cloudflare R2 / AWS S3)

For large catalogs or when you need to shut down WordPress quickly, you can batch-download all product images from WooCommerce and re-upload them to a cloud storage service like Cloudflare R2 or AWS S3, then update the image URLs in your product data to point to the new CDN location.

This approach gives you permanent, independent image hosting regardless of what happens to the original WordPress server. The workflow:

  1. Download all product images from WooCommerce (via the WC REST API or wp-content/uploads directory)
  2. Upload to Cloudflare R2 or S3 with public access enabled
  3. Update image URLs in your normalized product data
  4. Push to Shopify with the new CDN URLs

Best for: Large catalogs, situations where WooCommerce will be shut down immediately, or when you want full control over image hosting.

Option 4: Serve from WordPress while migrating gradually

For a staged migration (migrating in batches over weeks), you can leave the WordPress image serving intact and handle the re-hosting in Shopify incrementally. As each product batch is pushed to Shopify, Shopify fetches and re-hosts those images.

Best for: Large catalogs being migrated in phases.

Common image migration mistakes

Not checking image accessibility before migration

Some WooCommerce images have been deleted, moved, or protected by authentication (especially on staging/development sites). Run an image health check before migrating — request each image URL and confirm it returns a 200 response.

k-sync's Image Health panel sends HEAD requests to every product image URL and flags broken or inaccessible images before you push to Shopify.

Forgetting variant images

Variable products (e.g., a shirt in 5 colors) typically have one image per variant. Make sure your migration tool handles variant image associations, not just the main product image. Shopify supports assigning images to specific variants — check that your mapping preserves this relationship.

Losing image alt text

Image alt text is important for SEO and accessibility. WooCommerce stores alt text separately from image URLs. Confirm that your migration tool preserves alt text and maps it to Shopify's alt image field.

Image order changing

Shopify uses a position field to order product images (1 = main image). If your migration doesn't preserve position, your product gallery order may shuffle. Ensure your export includes position data and your import respects it.

Verification checklist after migration

What k-sync does for images

k-sync's migration pipeline handles images automatically when pushing to Shopify via the Admin API:

The Image Health panel (in the mapping tools) lets you run a pre-migration check that identifies broken image URLs before you push — so you can fix them or remove them rather than pushing products with broken images.

For CSV-based migrations, k-sync exports the image URL column in Shopify's format. If you need to re-host images to a CDN before pushing, you can update the image URLs in k-sync's product editor before generating the CSV.

Start your free WooCommerce to Shopify migration with k-sync →

Migrate your store with k-sync

Connect your WooCommerce store, validate your products, and push to Shopify in minutes. Free for up to 50 products.

Get started free

Related reading

Browse all migration guides