Jump to content

Images

From Wikven
The Earth, seen from Apollo 17 (1972).

You can embed images from Wikimedia Commons. Referenced files are downloaded and stored next to the HTML at build time, so the static site does not depend on Commons when viewed. See InstantCommons for details.

Local images

A bakery oven (circa 1850-1900), embedded here as a local image.

You can also use your own image files. Put them in your source directory, next to the .wikitext files, and embed them with the usual file syntax:

[[File:My photo.png|thumb|A caption]]

PNG, GIF, JPEG, WebP, and SVG files are supported. Raster images are thumbnailed at build time; an SVG is rasterized to a thumbnail when a converter is available, otherwise served inline.

The thumbnailing backend is detected from the tools present at build time: ImageMagick for raster images when it is installed (as in the Docker image), otherwise the built-in GD library (as in the standalone binary, which carries GD); SVG uses librsvg when present, otherwise native inline rendering. The pages render the same either way, ImageMagick simply produces higher-quality thumbnails and supports more formats.

To give a file its own description page, add a wikitext file named after it in the File: namespace, the same way other namespaced pages are named. For My photo.png, that is File:My photo.png.wikitext.


Retrieved from "Images.html"