9.2.1 Image Syntax

Here is the synopsis of the @image command:

@image{filename[, width[, height[, alttext[, extension]]]]}

The filename argument is mandatory, and must not have an extension, because the different processors support different formats:

If you want to install image files for use by Info readers too, we recommend putting them in a subdirectory like ‘foo-figures’ for a package foo. Copying the files into $(infodir)/foo-figures/ should be done in your Makefile.

The width and height arguments are described in the next section.

If an image is the first thing in a paragraph and followed by more text, then you should precede the @image command with @indent or @noindent to indicate the beginning of paragraph formatting. This is especially important for TeX output to get correct paragraph indentation.

Use @center to center an image (see @titlefont, @center, and @sp).

For HTML output, the alt attribute for inline images is set to the optional alttext (fourth) argument to @image, if supplied. If not supplied, the full file name of the image being displayed is used. The alttext is processed as Texinfo text, so special characters such as ‘"’ and ‘<’ and ‘&’ are escaped in the HTML output; also, you can get an empty alt string with @- (a command that produces no output; see @- and @hyphenation: Hyphenation in Printed Output).

For Info output, the alttext string is also processed as Texinfo text and output. In this case, ‘\’ is escaped as ‘\\’ and ‘"’ as ‘\"’; no other escapes are done.

In Info output, a reference to the binary image file is written (trying filename suffixed with extension, .extension, .png, or .jpg, in that order) if one exists. The .txt file is also literally included, if one exists. This way, Info readers which can display images (such as the Emacs Info browser, running under X) can do so, whereas Info readers which can only use text (such as the standalone Info reader) can display the textual version.