How can I fix the error of non-existing image IDs on my product?

I also need help with the process for unattaching the IDs! Please help.