Skip to main content

Images

Basic Usage

Insert images with Markdown syntax. Place image files under static/img/ and reference them with a path starting with /img/.

![diagram](/img/logo.svg)

Center an Image

Markdown cannot center images directly; wrap them in a <div style={{ textAlign: 'center' }}> instead.

<div style={{ textAlign: 'center' }}>
<img src="/img/logo.svg" alt="diagram" />
</div>

Rotate an Image

Add style={{ transform: 'rotate(deg)' }} to <img>; positive values rotate clockwise.

<img src="/img/logo.svg" alt="diagram" style={{ transform: 'rotate(15deg)' }} />

Center and Rotate

Combine centering (outer div) and rotation (inner img) to apply both at once.

<div style={{ textAlign: 'center' }}>
<img src="/img/logo.svg" alt="diagram" style={{ transform: 'rotate(15deg)' }} />
</div>

Image paths .svg, .png, .jpg, etc. all work; this site applies a uniform rounded corner and thin border to images (see the global .markdown img style).