Version 15 (modified by Radek Bartoň, 14 years ago) (diff)

Updated according to new implementation.

Screenshots Plugin

Notice: This plugin is unmaintained and available for adoption.


Provides screenshots upload and viewing subsystem for Trac. Uploaded screenshots can be described with short name, longer description and custom tags (if TracTags plugin is installed) and assigned to any number of components and versions registered in Trac. Screenshot uploads can be listed in timeline and screenshots can be referenced or embender in wiki pages. Plugin internally defines few interfaces for further extension.

Bugs/Feature Requests

Existing bugs and feature requests for ScreenshotsPlugin are here.

If you have any issues, create a new ticket but read BugReporting page first, please.


Download the zipped source from [download:screenshotsplugin here].


You can check out ScreenshotsPlugin from here using Subversion, or browse the source with Trac.


You need to have PIL library installed to get plugin working. Plugin optionally depends on TracTags plugin for screenshot tagging support.


Install plugin's egg and set variables in trac.ini configuration file according to your needs. Following list shows all of them with their default values:

title = Screenshots
path = /var/lib/trac/screenshots
ext = jpg png
formats = raw html jpg png
default_format = html
default_components =
default_versions =

Value of title variable sets caption of item in Trac's main navigation menu, path is location of directory where plugin should store uploaded and generated images and ext is list of allowed file extension which can be uploaded. Using formats option you can set in wich formats can be images downloaded and default_format is format which will be returned if no format is specified in request. It must be one of formats supported by your PIL library installation. There are two meta formats: raw denotes original format of uploaded image and html is image embended in HTML page. default_components and default_versions options sets default values for component and version filter. Set these variables according your Trac setup, otherwise, you would't see any screenshots with default filter.

If you run Trac in environment which needs to enable plugins explicitly put in trac.ini these lines:

TracScreenshots.init.ScreenshotsInit = enabled
TracScreenshots.core.ScreenshotsCore = enabled
TracScreenshots.api.ScreenshotsApi = enabled = enabled
TracScreenshots.timeline.ScreenshotsTimeline = enabled # For 0.11 branch.
TracScreenshots.tags.ScreenshotsTags = enabled

If you don't have TagsPlugin installed replace last line with

tracscreenshots.tags.screenshotstags = disabled

Create directory you have specified with path config option and make sure it is accessible by Trac server. The next step is to upgrade your environment:

# trac-admin <path_to_environment> upgrade


Screenshots plugin defines three permissions. With SCREENSHOTS_VIEW permission you can browse screenshots and see screenshot uploads in timeline. SCREENSHOTS_ADMIN adds you rights to uplad screenshots and SCREENSHOTS_FILTER allows you to modify component and version filter. You can add these permissions by typing following commands from commandline or you can use WebAdminPlugin to do it for you:

# trac-admin <path_to_environment> permission add <user> SCREENSHOTS_VIEW
# trac-admin <path_to_environment> permission add <user> SCREENSHOTS_ADMIN
# trac-admin <path_to_environment> permission add <user> SCREENSHOTS_FILTER


There are a macro [screenshot:<screenshot_id>] for screenshots referencing and embending. Expamples of usage is here:

See fig [screenshot:1].
Take a look at [screenshot:1 screenshot].
Screenshot of main window is: [screenshot:1,width=640,height=480].

Possible attributes are:

  • align - Specifies image alignment in wiki page.
  • border - Sets image border of specified size.
  • width - Width of image, embeds image if specified. Set to 0 if you want original image width.
  • height - Height of image, embeds image if specified. Set to 0 if you want original image height.
  • alt - Alternative description of image.
  • title - Title of image.
  • longdesc - Detailed description of image.
  • class - Class of image for CSS styling.
  • id - ID of image for CSS styling.
  • usemap - Image map for clickable images.
  • format - Format of returned image or screenshot behind link.


Poll(Are you using this plugin?; Yes, it's usefull.; No, it's useless.; No, I don't need it.)?

Change Log

16397 by rjollos on 2017-03-25 09:37:00
Remove obsolete "0.9" code
16191 by rjollos on 2017-01-21 03:51:42
1.2dev: Adapt to Trac 1.2 API

The changes need additional testing. Please be sure to
backup your environment before upgrading, and preferably
test in a sandbox first. Report any issues to #13007.

Fixes #13007.

13303 by hasienda on 2013-06-23 13:10:27
ScreenshotsPlugin: Use own actions instead of 'WIKI_*' for tagging action permission checks, closes #10940.

Fixing the issue for the two most current branches simultaneously.

12139 by rjollos on 2012-10-10 01:54:13
Fixed incorrect source code encoding (
8987 by Blackhex on 2010-09-20 12:56:24


  • Fixing #7701 and other PosgreSQL related problems.
  • Trac 0.11.5 dependency for 0.11 branch added.


Author: Blackhex

Attachments (1)

Download all attachments as: .zip