Lacan's statement is a kind of inversion of what is usually meant by havng one's picture taken. For Lacan, the gaze in effect constitutes the one doing the looking. In other words, when one looks at a picture (or any visual representation), the act of looking in effect "writes" or creates the subjectivity of the person doing the looking.
This has to do with Lacan's theories about desire and the notion of "lack." At the risk of oversimplifiying, the idea is that desire is a response to a fundamental "lack" or "missing thing" inside us. Our identity as individuals is mediated and defined by this lack. Desire is a constant, always futile, attempt to find this "missing thing." When one looks at a picture, one projects this "lack" onto the picture. The act of the gaze is to see, in the picture, the thing we desire. This process is so deeply embedded in our psyche that we never actually "see" the thing itself; in fact, this gaze is turned back on ourselves, so that that (paradoxically) we are seen by the object of our gaze before we actually see the thing itself. We are, in effect, "trapped" within the gaze. In this way, it is the image that "writes" our subjectivity on ourselves, in effect photographing us -- the word "photo-graph" here meaning literally that we are written by light, or vision.