Use M-x auto-image-file-mode to enable Emacs to open graphic files such as JPEG or PNG format files. Whether Emacs is able to display a certain file format depends on your installation – Emacs must have been compiled with the correct options (or it must have detected the libraries at configuration time).
The code that does this is also used by Gnus, for example, to inline MIME attachments of the correct format.
auto-image-file-mode works by turning any insert-file of an image into an image display property. This is a little bit scary, depending what sort of things you normally do with insert file. GNU Emacs 22 has instead a new ImageMode? which is a major mode, which you might prefer (it’s in fact the new default).
21.2.50 already supports PBMs and XBMs… Excellent! – GirishB
So, when do we this extended to use aalib for console mode viewing? :-) --ShaeErisson
How do you show an image (PNG, JPEG, GIF) in Emacs 21.2, like it does on the intro screen? Can you make the image auto-load when a text file is loaded? I am using Linux, X, and have Emacs 21.2 (not XEmacs). – LionKimbro
Does Emacs 21.2 support viewing of any images (BMP,XBM,ICO,PNG…) on Windows?
If you want to save a text file with images you need a new file format. MULE is used for non-Ascii text encodings, not for images. Normally Emacs will save only the text of a buffer, not its overlays (colors, fonts, etc.). You can re-attach an image to the text file by creating an overlay with the 'display property on it (see AutoSmiley for an example package that adds images to a text file). --AmitPatel