I've just inherited a site that's being migrated to a new host, and I'm attempting to tidy up the database during the process.
The WooCommerce site had roughly 10,000 products resulting in somewhere around 34,000 product images.
The site also had an active blog, and a lot of specialized pages with non-product images.
I have wiped all the products out of the db, but I'm stuck trying to figure out how to erase all images attached to _product type posts, as well as wiping their records from the database.
End goal is to permanently delete all product images from the media library as well as the database.
Any help would be much appreciated.