Search

Search articles, pages, topics, and people.

Image Test

ByGinny WeasleyPublished on

This post exercises the image rendering paths used by the MDX typography system, including plain images, captions, unusual aspect ratios, linked images, inline images, decorative images, and an explicit rich-text figure.

Basic image

A standalone Markdown image without a title should render as a normal responsive image without a caption.

A wide placeholder used to test the default MDX image style

The paragraph following the image should retain the normal prose spacing.

Local image

Use a relative path to load the images stored in the asset folder with the same name as the MDX file.

A image stored in the asset folder

Image with caption

The Markdown image title is used as the visible caption. The native title attribute should be removed after the image is converted into a semantic figure.

A system architecture diagram represented by a placeholder
Figure 1. Overview of the example system architecture.

The caption should be centered, visually secondary, and separated from the image without creating excessive vertical space.

Portrait image

A tall image should preserve its intrinsic aspect ratio and remain within the prose width.

A portrait placeholder used to test tall images
Figure 2. A portrait image used to verify responsive height and aspect-ratio handling.

Small image

A small image should not be stretched to the full width of the article.

A compact square placeholder
Figure 3. A small image should remain compact rather than being enlarged to the full content width.

SVG image

SVG files should use the same responsive layout and caption treatment as raster images.

A vector placeholder used to test SVG rendering
Figure 4. SVG rendering should remain sharp in both light and dark modes.

Long caption

This image has a deliberately long caption to test wrapping, maximum caption width, alignment, and line height on narrow screens.

A wide diagram with a long explanatory caption
Figure 5. This deliberately long caption verifies that figure descriptions wrap cleanly, remain centered beneath the image, and do not become difficult to read on narrow mobile displays.

Linked image

A linked image should remain clickable. Because the image is wrapped by an anchor, the automatic Markdown-title-to-caption transform should not treat it as a standalone captioned image.

A linked image that opens the project repository

Decorative image

The following image intentionally uses an empty alt value. It should render with alt="" and be ignored by assistive technologies.

Rich-text caption

Use an explicit MDX figure when a caption needs formatting such as emphasis, inline code, or a link.

A placeholder diagram demonstrating a rich MDX caption

Figure 6. This caption contains emphasis, an inline MDX term, and a reference link.

Image inside a GitHub alert

The image should remain responsive when nested inside a generated alert component.

Note

The following image is nested inside a GitHub-style alert.

A compact image nested inside an alert

Image inside a blockquote

A regular blockquote should also contain images without overflow.

The following image belongs to a normal blockquote rather than a GitHub alert.

A compact image nested inside a blockquote

Consecutive images

Consecutive image blocks should preserve consistent spacing without collapsing into each other.

The first image in a consecutive pair
Figure 7. The first image in a consecutive pair.
The second image in a consecutive pair
Figure 8. The second image in a consecutive pair.

The final paragraph verifies that normal prose resumes cleanly after the image sequence.