• Resolved simplyniknaks

    (@simplyniknaks)


    Earlier today I added some new products to my website and deleted some.
    Later on I decided to clean up my media library to delete the images for the deleted products.
    However, when I filtered the media for ‘unattached’ I was surprised I got several hundred such images. Trying to find the images for the deleted products was next to impossible so I thought of deleting them all – but then I noticed it was also saying that the images for the new products were also unattached. This is of course nonsense. So how can I make sure that the other ‘unattached’ images are also correct before I delete them?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    So how can I make sure that the other ‘unattached’ images are also correct before I delete them?

    You can manually attach them: https://cld.wthms.co/pXKhR2

    If you have many products then you can try a CSV import route to attach the images.

    Kind regards,

    Thread Starter simplyniknaks

    (@simplyniknaks)

    No you misunderstood.
    I already know some of the images are actually being used – but they come up when I filter for unattached.
    I want to delete all my unused images to save some space. However, if I filter on ‘unattached’ I am seeing images I know are being used. If I delete all unattached images then some of my products would now have no pictures.
    I just want some accurate way to delete media files that are no longer being used.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @simplyniknaks This is due to how WordPress itself works. If an image is uploaded through a post, like a product, then it is attached to that post. The post is set as the image post’s parent. If the image is uploaded in any other fashion, then it is not attached.

    I tried to do a csv import to get the images to attache to products, and that did not work. It appears the only way to do this may be a manual process or programmatically.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unattached Image being used by a product’ is closed to new replies.