Any easy way to add one image to all products in one collection?

Picky
Tourist
5 0 1

Hi there,

I have thousands of products in each collection on my store.

I would like to know if there is an easy way to add one image to all products in entire collection?

Thanks,

Picky

0 Likes
Yasmin_M_
Shopify Staff
Shopify Staff
182 0 12

Hi Picky,

Yasmin here from Shopify Support!

A great way to do this is by using a CSV file. You can export your products, add image links in a spreadsheet, then import them with the new information. Here's our guide on using CSV files: https://help.shopify.com/manual/products/import-export

These are the steps you would go through for your specific case:

  • Filter your products based on the collection you would like to edit. So for example if you have a collection with the condition "Product tag equals Dress", use the filter feature to find those products:

  • Click Export in the top right corner and choose to export your current search results
  • Open your CSV file in your spreadsheet software of choice
  • Follow these steps to add image links to your products: https://help.shopify.com/manual/products/import-export#manipulating-the-product-csv-file
  • Save your file and go back to the admin, select Import
  • Make sure to check the "override existing products" box when you import this new file, this will prevent you from creating duplicates of all products!

You can repeat these steps for each collection. Hope this helps! 

By the way I am moving this topic to our general Shopify Discussion forums, I think it's a better fit there :) 

0 Likes
AudioVideoDistr
Shopify Partner
1 0 2

So you're suggesting to go into your entire csv file and add 1 row for each product, of which we have thousands?

 

This is a terribly time consuming way to do things.

 

There has to be a better way.

lemonstand
Tourist
9 0 1

Did you happen to find that better way? We often have the same issue and this CSV import is a bit rudimentary for this kind of product portfolio

0 Likes
Jannes_H
Tourist
4 0 3

You could upload one image in your assets folder, and in the code apply when the image field is empty, show the uploaded image. 

0 Likes
lemonstand
Tourist
9 0 1

thanks for your reply! Not sure if I understand you correctly. How exactly would be the process, if you would like to add a set of (let´s say 5) pictures to all products patching a certain criteria?

0 Likes
Jannes_H
Tourist
4 0 3

Depending on your theme and criteria you can do so in the theme code editor.
Assuming your current product doesn't have any images: this could be a start:
Unfortunately I could not quickly find how to add the alternative images to the product.media array.

 

{%- if product.media.size == 0 -%}
   <!-- define conditions here -->
   {%- if collection.title = 'headphones' -%}
     {%- if product.vendor = 'sony' -%}
       {%- capture new_image -%}
         https://via.placeholder.com/400&text=Sony-Headphones-front::Sony headphones front--
         https://via.placeholder.com/400&text=Sony-Headphones-back::Sony headphones back--
         https://via.placeholder.com/400&text=Sony-Headphones-left::Sony headphones left--
         https://via.placeholder.com/400&text=Sony-Headphones-right::Sony headphones right
       {%- endcapture -%}
    {%- endif -%}
  {%- endif -%}

  {%- assign new_images_array = new_image | split: '--' -%}	
  {%- for media in new_images_array -%}
    {%- assign media_array = media | split: '::' -%}	
    {%- assign this_media_url = media_array[0] -%}	
    {%- assign this_media_alt = media_array[1] -%}	
    <img src="{{ this_media_url }}" alt="{{ this_media_alt }}">
  {%- endfor -%}
{%- else -%}
    <!-- normal template code here -->
{%- endif -%}
0 Likes
lemonstand
Tourist
9 0 1

Still not getting it, sorry. What exactly would that do?

The issue as I understood Picky and also mine is, that we have a huge amount of products, and want to add one or more pictures to the individual product page.

Let´s assume you have 100 different products, but all have one detail in common. So all of these products should get this one image showing the common detail added to their product description. And in total you have mans different sets of these 100 products.

 

0 Likes
Jannes_H
Tourist
4 0 3

Then I would assume you are already working with an excel import module/app installed on your Shopify Store?
I just started working with an app called Excelify https://excelify.io/ (they will change their name to Matrixify)

With this app I can easily assign images to all my products and variants.
Once i have added one image to my store, i get the image link and past this in all other products that need the same image.

There is one but, it seems shopify genererates different image files for each product, as the source is the same.
So in your frontend the website will load serveral diffeent images, having the same content, making your website not as fast as could be.

I was having this issue, looking for a solution that lead me to this forum.  

lemonstand
Tourist
9 0 1

The Excel import doesn´t work, because you have to add one line manually for each product, copying the handle to the empty line, insertinc the picture link, ...

That´s at least the workflow we came up with.

 

Will take a second look at Excelify. we considered it in the past and did not use it for a reason I forgot.

0 Likes