An optical adapter for connecting between a beam splitter of a surgical microscope or an ophthalmic slit lamp microscope and a digital camera equipment including mobile phones, tablet computers, cameras, video cameras with image capturing function is provided. The optical adapter includes a lens group located on an optical path and an optical image rotating lens group for adjusting a direction of an optical image on a photosensitive unit of the digital camera equipment. The optical image rotating lens group is configured to be either independently rotatable around optical axis or be set fixedly. Embodiments of the present invention provide a system and method for real-time adjustment of the direction of an optical image on the photosensitive unit of a digital camera equipment, where regardless of the position of the digital camera a satisfactory direction of the optical image can be obtained with a simple user friendly and convenient structure.