### 32.2 Specifying options for HTML graphics

If some referenced graphics are already in a format appropriate for Web use, such as JPEG, GIF, or PNG (see §40.1.4 Graphics formats for HTML) you do not have to convert them.

Copy the graphics files into the project directory with the generated .htm files, or allow DITA2Go to copy them for you to the wrap directory; see §32.1 Locating graphics files for HTML. Unless you explicitly remap a name in the [GraphFiles] section, or specify a GraphSuffix in the [Graphics] section, the graphic name is always passed through unchanged.

If the original graphics are not in the same directory as the DITA files that reference them, but they will be in the same directory as the generated HTML files, set the following option also (see §32.1 Locating graphics files for HTML):

[Graphics]
StripGraphPath=Yes

If you have supplied replacements for referenced graphics that are in a different format, and if the replacements have the same base names as the originals, you can specify just the new file extension (see §40.2.1.2 Substituting graphics files for HTML):

[Graphics]
GraphSuffix=jpg

Use this setting when you convert referenced graphics with a third-party program; see §4.4 Processing graphics.

If you have replaced some referenced graphics with others, and your graphics are in several formats, such as mostly GIF plus some JPEG and some PNG, you can do the following:

1. Identify the “main” format by specifying its file extension; for example:

   [Graphics]
   GraphSuffix=gif

2. Specify file extensions for the other formats as exceptions:

   [GraphSuffix]
   ; old suffix = new suffix, overrides [Graphics]GraphSuffix
   ; jpg=jpg leaves all .jpgs alone even if GraphSuffix=gif
   ; wmf=png .wmfs are made into .pngs using a third-party tool
   jpg=jpg
   png=png

3. Specify file names with extensions for any individual exceptions (see §40.2.1.2 Substituting graphics files for HTML):

   [GraphFiles]
   newlogo.jpg=newlogo.gif

Previous Topic: 32.1 Locating graphics files for HTML

Next Topic: 32.3 Omitting graphics from HTML output

Parent Topic: 32. Including graphics in HTML

Sibling Topics:

32.1 Locating graphics files for HTML

32.3 Omitting graphics from HTML output

32.4 Selecting and modifying graphics

32.5 Positioning graphics in HTML output

32.6 Specifying HTML image attributes

32.7 Providing (or omitting) alternate text for images

32.8 Scaling images for HTML

32.9 Creating image maps for HTML

32.10 Supplying a background image or watermark

Table of Contents • Index