How to delete images from database with product September 22, 2022 by Tarik Billa I’d first get the attachment ID and with the attachment ID you could use wp_delete_attachment($att_id)