The invention presented generally refers to an optical adapter device which magnetically attaches one or more optical elements or assemblies to a magnetic portion of an electronic device having a camera. In particular, the optical adapter is shaped to align a first opening in housing of the optical adapter with the camera of the electronic device. The novel device and method utilizes the inherently magnetic properties of the electronic device itself, instead of requiring a predetermined magnetic mate to be built into the electronic device.