XMLTagsEditHistoryDiscussion

  1. Introduction
  2. Purpose
  3. Current status
  4. Dependencies
  5. Supported formats
  6. Usage
    1. Adding an image to the repository
    2. Including an image in an article
  7. Authors

Introduction

This page describes the Svnwiki extension for handling images.

Purpose

The image extension allows you to include images in a Subversion repository and will handle them more intelligently than it handles regular files. In particular, it does the following things for images on which it is enabled:

Current status

The image extension is not yet finished:

Dependencies

The image extension depends on NetPBM to do its magic.

Supported formats

Currently the image extension only supports the PNG and JPEG image formats.

Usage

Adding an image to the repository

In order to use this extension you need to add an image to the repository. Note that files inside a Subversion repository handled by Svnwiki should *not* have an extension set (instead, they should have the svn:mime-type property):

svn add file

Now set the mime-type correctly:

svn ps svn:mime-type image/png file

Right now the only supported MIME types are image/png and image/jpeg.

Finally, enable the image extension in your file:

svn ps svnwiki:handler image file

Alternatively, you could simply set the image property in the containing directory (in which case you should only add images to that directory).

Commit your file and you should be done.

Including an image in an article

To include an image (added as described above in order for this extension to handle it) in an article, use the image tag, as follows:

<image src="FILE" size="SIZE" class="CLASS" caption="CAPTION"/>

The image will be shown inside a div with a caption describing it. It will be linked to the HTML page for the image (in which the user can, among other things, view the different sizes in which the image is provided).

All parameters except src are optional. They have the following semantics:

FILE
This is the path to the image file, relative to the article to which you are adding the image tag. You can use an absolute path as well (starting it with a /).
SIZE
The size for the largest coordinate in the image. If a render for this size is not available, the largest one such that its largest coordinate is smaller than the specified size will be used. The default value is 500.
CLASS
Use this if you want the div containing the image to have a specific class. The default value is image.
CAPTION
By default, a caption will be shown based on the title of the image file (see the svnwiki:title property). Use this option to override it.

Authors

This extension was created by Alejandro Forero Cuervo and Nelson Castillo.

Last update: 2007-07-14 (Rev 12254)

svnwiki $Rev: 12966 $