Support » Plugin: WooCommerce » WooCommerce Product Import Duplicating Images

  • daza110

    (@daza110)


    When using the CSV import option for WooCommerce I have to upload the images first otherwise they will not import which is fine.

    So I open Media Manager, import my images with the correct names as per the CSV and then go back to Product Import. At this point I import the produces and then if I log into my server via SFTP I can see that each of the image has been duplicated. For Example I uploaded 3 images, they were named: “ArielWedding.jpg”, “BelleHC.jpg” and “BelleWedding.jpg”. WooCommerce then re creates these images as “ArielWedding-1.jpg”, “BelleHC-1.jpg” and “BelleWedding-1.jpg”. This makes no sense to me? And just clogs up my server.

    Its rather annoying that when I upload them to the Media Manager WordPress creates 6 copies of the first image in different sizes alone. That when I import the products WooCommerce then creates another 6 images with “-1” beside them!

    I would have thought that the whole point of uploading the images first would mean you link the product to that one, not recreate it another 6 times!

    I have also noticed that within the Media Section, the images are not attached specifically to the Products its self, unlike when I add then manually.

    Please see 2 images

    SS01 Shows that they are not “Attached” to product via import
    https://www.dropbox.com/s/azqqb1a2imdhu81/SS01.png?dl=0

    SS02 Shows that the images are duplicated with “xxxx-1.jpg”
    https://www.dropbox.com/s/nu1qb011mlyrrxs/SS02.png?dl=0

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • @daza110

    Thank you for writing the forums, and sharing some details of the symptom.

    Looking for confirmation — Is it the (new-as-of-WooCommerce-version-3.1) WooCommerce native CSV import functionality that you’re using?

    (I mean this: https://github.com/woocommerce/woocommerce/wiki/Product-CSV-Importer-&-Exporter )

    (As opposed to another 3rd party plugin, etc.)

    As an initial step, I want to be able to reproduce the symptom of the CSV import failing to cause the images to become imported.

    Would you please share with us a sample CSV file, that manifests the symptom?

    Would you please also describe what directory the image file(s) are in, in the case when the CSV fails to import?

    Looking forward to learn more about the concerns!

    Please forgive the delayed response!! Yes I can confirm that it is that exact importer I am using.

    This is the CSV https://www.dropbox.com/s/wqucssf6yelnv69/Product%20Import%20CSV%20TEST.csv?dl=0

    The directory is crown-collectables.co.uk/wp-content/uploads/2017/08/

    • This reply was modified 2 months, 3 weeks ago by  daza110.

    @daza110

    Thank you for clarifying and telling more details.

    I’ll see if I can reproduce and then again reply.

    @daza110

    Thanks again for having shared the additional details.

    I see what you mean, that the act of importing images during the .csv import does make a copy of the file during the process.

    Also, I agree that the import also usually fails in my tests if I try to specify just the filename, or anything other than a full “http:…” url path for the image column value.

    Also, I agree that if one uses the media library to add the images prior to the .csv import, then that results in even more clutter.

    How about this?

    First, directly upload (like via direct SFTP) the product images to a separate folder, for example
    ...wp-content/uploads/product_images/

    Then, in the Images column of the .csv import, reference that folder. for example set the value for that column for the first row from the “Product Import CSV TEST.csv” file as:
    https://www.crown-collectables.co.uk/wp-content/uploads/product_images/LadyTremaine.png

    What do you think?

    @daza110

    Will you kindly start to mark this thread as ‘Resolved’? (including some solution detail)

    Or if there’s still concern, then will you update how it is?

    daza110

    (@daza110)

    @mjjojo Please once again forgive the very delayed response.

    I confirm that this work around works fine and prevents the duplicate “xxxxx-1”, it just means I have to delete them from the “temp” folder I created later which is no problem.

    It would still be beneficial to me to see the “Attached” image in the Media Library. As per my SS01 above in description (copied below), SS01 Shows that they are not “Attached” to product via import however when added one by one they automatically attach.

    Is this something you can build in to the import? It just cleans every thing up.

    https://www.dropbox.com/s/azqqb1a2imdhu81/SS01.png?dl=0

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.