This is an old revision of the document!


Manual of Style: Prepare and Edit Images

To insert a new image into a Zendiwiki page, three steps are required:

  1. Pre-edit the image file with graphics software if necessary.
  2. Upload the image file to Zendiwiki.
  3. Embed the image in the DokuWiki text of the page.

For Zendiwiki it is strongly recommended to use only four image sizes: Width 360, 540, 720 or 1080 pixels. (The size of an image is usually described by its width. A change in width means a proportional change in height.) To ensure optimal functionality, only image files that are already in these formats should be uploaded to the wiki. The recommended format for image files is PNG.

You can resize images with your favourite image editor software, such as GIMPFOSS. Instructions for this are available, for example, at https://www.gimp.org/tutorials/GIMP_Quickies/#changing-the-size-dimensions-of-an-image-scale.

As an alternative, the ImageMagick software package FOSS for image processing contains the command line tool convert. With it it is possible to convert various properties of image files efficiently and accurately, even in one pass.

Example 1:

convert -resize 540\> waterfall-original-big.jpg waterfall-540.png

This command does the following:

  • Create a new image file waterfall-540.png in the current directory.
  • Convert the file from the .jpg image format to the .png format.
  • Shrink the image to the width of 540 pixels. \> means: do not enlarge a smaller image. (With enlarging, the image quality tends to deteriorate.)
  • Preserve the aspect ratio. ImageMagick by default keeps the with-to-height proportion of an image.

Example 2:

convert “*.jpg[360x>]” -set filename:base “%[basename]” “images-360/%[filename:base]_w360p.png”

Does the following:

  • *.jpg: Convert all image files in the current directory, ending with .jpg.
  • [360x>]: Shrink the images to 360 pixels width. Do not enlarge smaller images (achieved by the >).
  • Convert the image format to png.
  • Keep the filenames (%[basename]), each extended by the string _w360p.
  • Store all converted files in the sub directory images-360/ (must exist).