Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @felipens3

    I understand you are looking for a way to remove duplicate images created after importing products to WooCommerce with a third-party integration website. However, the only workaround would be to not post data that has not changed to the API as discussed here: https://www.ads-software.com/support/topic/woocommerce-api-creates-duplicate-images/.

    Hope this helps!

    Thread Starter felipens3

    (@felipens3)

    The images have the same name. But woocomerce change it adding a number.
    The workaround “not post data that has not changed” I think will not gonna work.
    The integration post the product and use the 10 links for variations, they need the links to show wp to use this specific images.
    But wp adds number to final instead using the already uploaded images.

    Mirko P.

    (@rainfallnixfig)

    Hi @felipens3,

    But woocomerce change it adding a number

    This isn’t really a WooCommerce thing. When you send the same image URL (exact same link) via API, WordPress duplicates the image and adds -1 at the end.

    I’ve performed a test via REST API and can confirm this is the expected behavior. This is how I sent a PUT request to update Beanie product price and featured image using the same image URL.


    Image Link: https://i.imgur.com/YzCw6Z2.png

    and this is the result:


    Image Link: https://i.imgur.com/he67Dto.png

    I’d suggest reaching out to your third-party plugin developers directly for further assistance with this issue. While we’re experts on our own products, third-party plugins are best supported by their own authors/developers.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicated images on Rest API product upload’ is closed to new replies.