Shopify bulk delete variant images: the cleanup workflow

Even older products in your Shopify catalog can use a sprucing up. Look at the images and find out why you’re headed towards image limits. Did you know that most merchants add far more images than they realize. Old images from failed campaigns, discontinued variants, duplicate CSV imports, extra studio shots that were meant to be deleted but never got around to. All of these add up and slow you down. The cap is 250 images per product so it may sneak up on you if you don’t keep your product images organized.
This isn’t a simple “click delete 200 times” process. This is a workflow for finding the orphans, deleting them in bulk, and (unlike the rootrider approach) not mowing down variants that need the orphans.
If you were expecting more than the ability to delete individual images from the product page in Shopify, sorry. It turns out you can delete multiple images at a time, and there are methods for doing bulk deletes using either the Shopify API or a Shopify app, which we’ll be exploring in this post.
In this post
- Why bulk deleting variant images matters
- Native Shopify limits
- The Rubik Variant Images workflow
- API-based bulk delete
- Keeping it safe (don’t nuke a live gallery)
- Frequently asked questions
- Related reading
Why bulk deleting variant images matters
Three reasons it’s worth the effort.
One, Shopify caps each product at 250 image files, be that 250 images, 250 videos, 250 3D models. For a store with 20 colors, 5 sizes and 3 shots per variant this limit is reached within a short amount of time. Worse still, you can’t upload an additional image until you have removed an existing one. Very handy for ruining a running campaign.
Two – admin performance. When you have more than 200 products with images (or more) your admin is going to take a lot longer to load. Saving a product will be slower, the bulk editor slower, the files area slower to load. I’ve noticed that most of these issues around 8 seconds per page – which is likely a result of the media weight.
Three, the customer experience. Yes, the admin may find this useful, but the bloat is still there, and the customer will see it. Extra media means extra DOM elements, more jQuery on the gallery pages, slower switching between variants, and potentially displaying the wrong image for the wrong product color. This happens when variants point to old, deleted or removed media, and fallbacks are silently used instead. Last update was a year ago, so chances are something could use a media clean up.
Native Shopify limits
Here’s what Shopify gives you out of the box:
- Delete one image at a time from the product media grid.
- No “select all” button in the product media view.
- No filter for “images not assigned to any variant”.
- No way to delete across multiple products at once.
- No undo. Deleted media is permanently gone.
Native needs work. For small sites with 20 or less products and 30 images or less per product a manual might be sufficient to get by but for any larger site you will need help.
The Rubik Variant Images workflow
This isn’t a bulk delete tool, I think Rubik Variant Images is meant for mapping images to variants. But it is the fastest way that I know of to identify the orphans that you would then manually delete or update on the store. Here’s how I do it on the client stores.
- Open the product in Rubik. You’ll see every variant with its assigned media on the left, and the full product gallery on the right.
- Spot the unassigned images. Any image in the gallery that isn’t attached to a variant shows up plain. That’s your orphan list.
- Verify each orphan. Is it a shared image used across all variants (size chart, brand banner)? Keep it. Is it leftover from a discontinued color? Delete it.
- Delete from the Shopify product media grid. Rubik doesn’t delete product media itself (that’s a Shopify admin action). Use Rubik to identify, then delete from the product page.
- Bulk assign what’s left. Run bulk assign after cleanup so the remaining images re-group cleanly by gallery order.
The main difference that Rubik makes is that you can suddenly see which image you have. Before you might have several variants of a given image and guess which went to which slot. This makes deleting so much easier since you can confirm what each image actually was intended for.
Rubik supports more than just images – it also supports video and 3D models. Not only can you have different files for each variant, but each option type can have its own files for each variant too. And with up to 3 option types, that means up to 2048 variants per product (the Shopify cap with Combined Listings). Files can be assigned manually, assigned automatically at the product level using AI vision (based on product title, variant options, option names and file names/alt text) or in bulk by option type and image order. Hundreds of products can be processed in the background.
“Thanks Rubik! This is now the best app I have for Shopify. It was so easy to set up and customize the design elements to match our site. You can’t imagine how messy our set was before this app! Now it’s perfect!”
The Amma Shop, Rubik Variant Images review
API-based bulk delete
For merchants with hundreds of products and thousands of orphaned images, the API is the only real option. The Shopify GraphQL Admin API exposes productDeleteMedia, which accepts a product ID and an array of media IDs.
Rough workflow. For each product, query each product’s media with product(id).media(first: 250). Then for each media item check if it is referenced by any variant. If not add it to a delete batch. Call productDeleteMedia in chunks to comply with API call limits. Throttled to 10 calls per second. Log each deletion.
This works. However it is very easy to write a filter that deletes every image if you don’t do a dry run first. I recommend doing a dry run first, logging what’s happening to each file, and first testing it on a single product before running it on all 500.
Keeping it safe
Five rules for bulk deleting variant images without regret:
- Export everything first. Use the Shopify product image downloader to grab a ZIP backup.
- Dry run first. Preview the delete list before executing.
- Do one product first. Verify nothing broke. Then scale.
- Check cross-references. Some images are used in blog posts, theme sections, email templates. Deleting them breaks those too.
- Re-run variant assignment after. Rubik’s bulk assign mode re-groups the remaining images cleanly.
Note that bulk delete is not an reversible action in Shopify. This means no trash, no “undo delete”. A big delete operation of thousands of images means you’ll probably be manually re-uploading at least one of them.
See the Rubik setup in action? Live demo | Tutorial video | docs on all assignment modes. Try on a product for free on the 30 day free trial. Combine multiple colour products into one listing with Rubik Combined Listings, and then clean up the media for each colour with its own set of clean images.
Clean variants, faster admin
Frequently asked questions
Can I bulk delete variant images in Shopify natively?
Why not? Native admin only one at a time from the product media grid. Or options for GraphQL Admin API or an app that surface find orphaned media for bulk delete.
What is the Shopify product image limit?
250 media items per product. This is a Shopify limit, not an app limit and combines images, videos and 3D models.
Will deleting a variant image break the variant?
If using variants on a product, then Shopify will fall back to the main product image for that variant. The variant still exists and still sells, it just shows the generic image. Re-assign a new image after cleanup.
Can Rubik Variant Images delete images automatically?
This app shows you what Orphaned Images there are, but you have to actually delete them in the Shopify product admin. Rubik shows you what needs to be deleted, you do the delete in the Shopify product admin.
What happens to unassigned images when I run bulk assign?
Rubik’s bulk assign uses image-order grouping, not filename matching. Unassigned images follow the variant of the most recent group separator in gallery order. Treat this like fresh paper: clean up, then use it to assign cubes.
Is deletion reversible in Shopify?
No. Once you delete a product its media will be irreversibly deleted, so make sure you export a backup first, before embarking on a bulk delete session.




