Adding Images to Your Content
Elevate your content’s visual appeal by adding images.
Overview
DocC extends Markdown’s image support so you can provide appearance and display scale-aware versions of an image. You use specific components to create image filenames, and DocC uses the most appropriate version of the image when displaying your documentation.
[Image]
Component | Description |
|---|---|
Image name | Required. Identifies the image within the documentation catalog. The name must be unique across all images in the catalog, even if you store them in separate folders. |
Appearance | Optional. Identifies the appearance mode in which DocC uses the image. Add |
Display scale | Optional. Identifies the display scale at which DocC uses the image. Possible values are |
File extension | Required. Identifies the type of image. The supported file extensions are |
For example, the following are all valid DocC image filenames:
sloth.pngAn image that’s independent of all appearance modes and display scales.
sloth~dark.pngAn image that’s specific to dark mode, but is display-scale independent.
sloth~dark@2x.pngAn image that’s specific to dark mode and the 2× display scale.
To add an image, use an exclamation mark (!), a set of brackets ([]), and a set of parentheses (()).
Within the brackets, add a description of the image. This text, otherwise known as alternative text, is used by screen readers for people who have vision difficulties. Provide enough detail to describe the image so that people can understand what the image shows.
Within the parentheses, include only the image name. Omit the appearance, display scale, and file extension components. Don’t include the path to the image.
