How much did you go into the OCD side? There are versions of OCD that include intrusive images, and that could be what you are experiencing.
The ICD 10 defines it as
"Obsessional thoughts are ideas, images, or impulses that enter the patient's mind again and again in a stereotyped form. They are almost invariably distressing and the patient often tries, unsuccessfully, to resist them. They are, however, recognized as his or her own thoughts, even though they are involuntary and often repugnant" ICD-10 Version:2016
The ICD 10 defines it as
"Obsessional thoughts are ideas, images, or impulses that enter the patient's mind again and again in a stereotyped form. They are almost invariably distressing and the patient often tries, unsuccessfully, to resist them. They are, however, recognized as his or her own thoughts, even though they are involuntary and often repugnant" ICD-10 Version:2016