Is there a way to produce a microscopic film on a glass slide because I am trying to create a stanhope. For example in the image shown below, the image film is around 3 - 4mm.
Specific to the image itself, there are two photographic technologies that can produce the high resolution, nearly grain-free images you need for a Stanhope type viewer in the original size (roughly like half an 8mm movie frame).
One is microfilm. Most microfilm stocks are designed to render extremely high resolution images at extreme contrast, but all or nearly all can also be processed in low-contrast developers (POTA, H&W Control, etc.) to give "pictorial" gray scale, while maintaining high sharpness and resolution. Complicating this is that you need a positive image: this can be obtained either by reversal processing the microfilm (develop, bleach the developed silver without removing the undeveloped halide, fog and redevelop, fix only as insurance), or by exposing the microfilm with a negative image, in this application typically from a larger film negative.
The other is one of the oldest forms of photography: wet collodion. In this case, you could clean your glass (very thoroughly), then coat, sensitize, expose, develop, and fix before the collodion can completely dry. Even though this is 1850s to 1870s technology, collodion is capable of extremely high resolution. Given that it is blue-sensitive only, a collodion Stanhope would need to be exposed with a silver image negative using blue or UV light, but that's a minor consideration compared to the effort of developing your collodion technique to the point of being able to produce Stanhope size slides.
For obvious reasons, I'd recommend microfilm. Develop a means of cutting this film in the dark, or exposing multiple slides onto the film at once (so you can cut after processing), and you could produce Stanhope slides (in black and white) cheaply and in quantity. With some optical trickery, you could even make multiple images from the same negative in a single exposure, improving throughput.
The optics needed will most closely resemble a commercial microfilm camera -- just a macro setup, similar to a slide duplicator, with the correct ratio between subject and image size (ideally, using a lens optimized for the ratio you're using, hence suggestion of a microfilm camera, or the lens from one). A macro lens on a suitably modified conventional camera would be another option.
I'm not sure if you truly need glass. If you don't, look into transparencies. A regular inkjet printer should be able to give you positive prints on thin sheets of transparent plastic.
However, if you do need to print on glass, I would suggest you to use a spreadable light-sensitive emulsion such as Rollei Black Magic. Use masking tape or something similar if you want to create an image of a certain size on the glass, and spread the emulsion on this masked off area. Given the small print size, projecting as usual with an enlarger may not be feasible. With a small enough negative image, however, a contact print can be an option.