I occasionally optical migraines with flashing lights but usually subside
Typical optical migraine
Hello dear, welcome to Ask a doctor service.
I read your query and here is my advice.
I think you are just suffering a typical optical migraine. Normally it goes away on its own in 30 minutes. If it doesn't go you better have rest and close your eyes. Also you can use painkillers such advil or ibuprofen.
If it gets worse you can consult a neurologist to start a prescription drug such topamax or tricyclic antidepressants.
Hope I have answered the question.
Let me know if I can assist you further.