Support » Plugin: WooCommerce » Product upload generates copies of images: unwanted!

  • Resolved paul1964

    (@paul1964)


    Hi,

    The product upload (while using the update feature) generates copies of images and linking those copies to the products, instead of the original image as specified in the upload csv. This is completely unnecessary and unwanted, just wasting disk space.

    The images have been uploaded with the Media function correctly, so why is the Product upload function creating copies of these images? These copies get a -1 added to their name.

    It has been working nice, but recently this behavior popped up. I can’t say exactly, but at least since a few weeks.

    I’m using WordPress 6.0 and always updates as soon as new version is available.
    WooCommerce 6.5.1
    I’m using the default import function of WooCommerce

    Currently 2768 product, with equal number of images.

    PS. When uploading an already existing images, the upload function also adds a -1 to the image name but the above is different that is happening during the upload products. Never had that before.

    Anyone same issue? Ideas to resolve?

    Many thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support Daniel N. (woo-hc)

    (@danndumia)

    Hey @paul1964

    I understand you are concerned about the duplicate images created after importing new products.

    However, this is WooCommerce’s normal functionality. At the moment there is no way to check whether an entry already exists in the media library, hence the images are renamed.

    Thanks

    Thread Starter paul1964

    (@paul1964)

    Hey,

    How come? It has worked that way perfectly from the start a year ago, only recently the upload started to copy images. So, it must be a change in the system that caused that.

    There is no renaming, there is copying. So the system sees the original image in the Media library and then copies it. I fail to see how that is normal behavior.

    Please look into it. This consumes a lot of diskspace and it takes a lot of time uploading products.

    Thx

    PS. Not to mention that the upload procedure gets stuck sometimes and fails to complete. Leaving me with an incomplete upload and incomplete products.

    • This reply was modified 5 months, 3 weeks ago by paul1964.
    Thread Starter paul1964

    (@paul1964)

    According to the manual I found here:
    https://woocommerce.com/document/product-csv-importer-exporter/

    ——quote

    Images
    
        Images need to be pre-uploaded or available online to import to your store.
        External URLs are supported and imported into the Media Library if used, provided the images are directly accessible and not behind a redirect script (as happens on some cloud storage services).
        You can define the filename if the image already exists in the Media Library.

    —end quote

    I pre-upload the images into the Media library. However defining the name in the csv didn’t work but defining the complete path to the image in the Media library did work and all products were linked to the image specified. Only recently the upload started to copy those images creating duplicate images in the Media library.

    So, how to resolve this? I need a solution, I can’t maintain the shop correctly like the way it is working now.

    Please help!

    Plugin Support Margaret S. woo-hc

    (@margaretwporg)

    Hi @paul1964

    Thanks for your reply.

    It has worked that way perfectly from the start a year ago, only recently the upload started to copy images. So, it must be a change in the system that caused that.

    Only recently the upload started to copy those images creating duplicate images in the Media library.

    In order to check your configuration and assist you further, could you please share the following:

    1. System Status: You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
    2. Fatal Error Log: Share a copy of any fatal error log found under WooCommerce > System Status > Logs (if available).

    We’ll look forward to your response and will be happy to assist further.

    Thread Starter paul1964

    (@paul1964)

    I’m using the standard Import on the Product page (not the WebToffee plugin).

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://shop.leggodt.nl
    Site address (URL): https://shop.leggodt.nl
    WC Version: 6.5.1
    REST API Version: ✔ 6.5.1
    WC Blocks Version: ✔ 7.4.3
    Action Scheduler Version: ✔ 3.4.0
    Log Directory Writable: ✔
    WP Version: 6.0
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: nl_NL
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.4.29
    PHP Post Max Size: 32 MB
    PHP Time Limit: 300
    PHP Max Input Vars: 1000
    cURL Version: 7.29.0
    NSS/3.53.1
    
    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.5.16-MariaDB
    Max Upload Size: 32 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 6.5.1
    WC Database Prefix: uwmtorbqh_
    Totale database grootte: 77.02MB
    Database gegevens grootte: 46.80MB
    Database index grootte: 30.22MB
    uwmtorbqh_woocommerce_sessions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    uwmtorbqh_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_woocommerce_order_itemmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    uwmtorbqh_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_actionscheduler_actions: Data: 7.52MB + Index: 11.00MB + Engine InnoDB
    uwmtorbqh_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_actionscheduler_logs: Data: 4.52MB + Index: 4.03MB + Engine InnoDB
    uwmtorbqh_akeeba_common: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_ak_params: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_ak_profiles: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_ak_stats: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_ak_storage: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_ak_users: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    uwmtorbqh_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB
    uwmtorbqh_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    uwmtorbqh_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_nf3_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_action_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_chunks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_field_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_objects: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_object_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_relationships: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_nf3_upgrades: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_options: Data: 4.50MB + Index: 0.50MB + Engine InnoDB
    uwmtorbqh_postmeta: Data: 22.55MB + Index: 9.00MB + Engine InnoDB
    uwmtorbqh_posts: Data: 3.52MB + Index: 3.47MB + Engine InnoDB
    uwmtorbqh_rsfirewall_hashes: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_rsfirewall_ignored: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_rsfirewall_offenders: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_rsfirewall_signatures: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_rsfirewall_snapshots: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_rsfirewall_unique_codes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_termmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_term_relationships: Data: 0.36MB + Index: 0.28MB + Engine InnoDB
    uwmtorbqh_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_usermeta: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    uwmtorbqh_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_wc_category_lookup: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    uwmtorbqh_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    uwmtorbqh_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    uwmtorbqh_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_wc_product_meta_lookup: Data: 0.34MB + Index: 0.63MB + Engine InnoDB
    uwmtorbqh_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    uwmtorbqh_wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_wt_iew_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_wt_iew_ftp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    uwmtorbqh_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 3990
    nav_menu_item: 11
    page: 12
    post: 1
    product: 2803
    revision: 99
    rsf_exceptions: 2
    rsf_threats: 4577
    shop_order: 7
    woc_hour: 1
    wpcf7_contact_form: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (14) ###
    
    Akeeba Backup Professional for WordPress: door Akeeba Ltd – 7.6.6
    Classic Editor: door WordPress Contributors – 1.6.2
    Contact Form 7 Afbeelding captcha: door KC Computing – 3.2.5
    Contact Form 7: door Takayuki Miyoshi – 5.5.6.1
    Google Listings and Ads: door WooCommerce – 1.13.4
    Legcodes: door Leggodt.nl – 1.0
    Product Import Export for WooCommerce: door WebToffee – 2.2.1
    RSFirewall!: door RSJoomla! – 1.1.25
    Salcodes: door Salman Ravoof – 1.0
    Woo Shop Opening Hours: door Krishna Paul – 1.0
    WooCommerce Breadcrumbs: door Anthony Hortin – 1.0.8
    Checkout Field Editor for WooCommerce (Pro): door ThemeHigh – 3.1.9
    WooCommerce Stripe Gateway: door WooCommerce – 6.4.1
    WooCommerce: door Automattic – 6.5.1 (update naar versie 6.6.0 is beschikbaar)
    
    ### Inactive Plugins (0) ###
    
    ### Dropin Plugins (1) ###
    
    maintenance.php: maintenance.php
    
    ### Must Use Plugins (1) ###
    
    akeeba-backup-coreupdate.php: door  –
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: left_space
    Thousand Separator: .
    Decimal Separator: ,
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    Enforce Approved Product Download Directories: –
    
    ### WC Pages ###
    
    Winkelbasis: #5 - /
    Winkelwagen: #6 - /cart/
    Afrekenen: #7 - /checkout/
    Mijn account: #8 - /my-account/
    Algemene voorwaarden: ❌ Pagina niet ingesteld
    
    ### Theme ###
    
    Name: YOOtheme Leggodt
    Version: 1.0.0
    Author URL: 
    Child Theme: ✔
    Parent Theme Name: YOOtheme
    Parent Theme Version: 2.7.22
    Parent Theme Author URL: https://yootheme.com
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Afgerond: 23.475
    Oldest: 2022-05-15 19:02:19 +0200
    Newest: 2022-06-15 11:12:28 +0200
    
    In afwachting: 1
    Oldest: 2022-06-15 22:52:21 +0200
    Newest: 2022-06-15 22:52:21 +0200
    
    ### Status report information ###
    
    Generated at: 2022-06-15 17:51:02 +02:00
    
    Thread Starter paul1964

    (@paul1964)

    Just 1 log.

    2022-06-13T19:05:08+00:00 CRITICAL Uncaught RuntimeException: Claimen van acties mislukt. Database-fout. in /var/www/vhosts/leggodt.nl/shop.leggodt.nl/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:683
    Stack trace:
    #0 /var/www/vhosts/leggodt.nl/shop.leggodt.nl/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(597): ActionScheduler_DBStore->claim_actions()
    #1 /var/www/vhosts/leggodt.nl/shop.leggodt.nl/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(153): ActionScheduler_DBStore->stake_claim()
    #2 /var/www/vhosts/leggodt.nl/shop.leggodt.nl/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch()
    #3 /var/www/vhosts/leggodt.nl/shop.leggodt.nl/wp-includes/class-wp-hook.php(307): ActionScheduler_QueueRunner->run()
    #4 /var/www/vhosts/leggodt.nl/shop.leggodt.nl/wp-includes/class-wp-hook.php(331): WP_Hook->app in /var/www/vhosts/leggodt.nl/shop.leggodt.nl/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php op de lijn 683
    Plugin Support Mirko P.

    (@rainfallnixfig)

    Hi there,

    Thanks for the system status and error logs.

    Before moving forward, could you please also share a sample CSV file that you use to import your product? This way we can follow exactly the same steps and check if we’re able to replicate the issue.

    To share files we generally suggest using https://uploadr.eu/#/ – you can upload the file and then share the URL on this thread. That will allow us to download it on our end. Or if you prefer, Dropbox/Google drive work too.

    Cheers.

    Thread Starter paul1964

    (@paul1964)

    Upload file for new products:
    https://uploadr.eu/Pj0hBjQU4

    Upload file for existing products (to modify data):
    https://uploadr.eu/h9Sq7aNJV

    Plugin Support Igor H woo-hc

    (@ihereira)

    Hello,

    Thanks for sending this information.

    When checking the CSV files I can see the file contains the full URL for the images e.g. https://MyShop.com/wp-content/uploads/MyProduct.jpeg this makes the importer download the images again, you can remove everything but the image name e.g. MyProduct.jpeg.

    You can create a file with only 1 product, edit the image column and try again.

    Let us know if this worked for you.

    Thread Starter paul1964

    (@paul1964)

    Hello,

    I’ve tried that, it didn’t work. The upload gives an error that the image cannot be found.

    I will test again, of course, to be sure.

    Still it is odd, I’ve done it like this for over a year and it has worked just fine: specifying the full path, upload, and it linked the image. Only recently the copying started. So there must have been a change in the system somehow that triggered that.

    But as said I’ll test it like you say and let you know. I hope it works.

    Thread Starter paul1964

    (@paul1964)

    The error message given by the upload is:

    BOCK: Preisziffern MIDI Compact Weiss Ziffer 1 – Schwarz, ID 26611, Artikelnummer 20007710101103 Kan afbeelding “200077101011.jpeg” niet gebruiken.

    It can’t use the image.

    https://uploadr.eu/22Kba5IPv

    Thread Starter paul1964

    (@paul1964)

    Maybe this will help.

    The Media libray states that the File URL for this image is:
    https://shop.leggodt.nl/wp-content/uploads/200077101011-scaled.jpeg

    But for older images I uploaded earlier the File URL is this:
    https://shop.leggodt.nl/wp-content/uploads/200052932001.jpeg

    I think I found the problem, the earlier images I uploaded were of size 2560×1920 but later images turn out to be of size 4032×3024 without me noticing that and then the Media library resizes these to 2560×1920 and renames the URL to 200077101011-scaled.jpeg causing the upload unable to find the image, and because I specified the full path it started to copy.

    Now that I’ve uploaded the image in 2560×1920 again, and specifying the filename only it works just fine again. Phew. I’m really glad we’ve figured it out, many thanks for your help! As often it turned out a combination of issues.

    Thank you for your help. I can now repair the images and uploads to work properly again.

    i am also facing the exact issue, duplicate images and not being able to figure out the solution my image size is also less then mentioned above and still not working

    Plugin Support xue28 (woo-hc)

    (@xue28)

    Hi @ganga2018

    Since you’re not the person who originally started this topic then, per the forum guidelines, would you please start your own topic? We’ll be more than happy to help there 🙂

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