All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
We are not aware of the source of those images that you see.
You should consult a trusted psychiatrist, for perhaps that was imaginations that you yourself imagined which can be repelled by treatment. If you imagine a forbidden image, then you have to repel thinking about it, because being carried away with bad thoughts results in unpleasant consequences.
Allah Knows best.