Max Image Size Plugin
Limit the size of images attached to TWiki topics
Introduction
This is an plugin to restrict the max size of an image. It gets called before images are saved to disk and changes the size of them according to the RESIZE_GEOMETRY string.
Syntax Rules
None.
MaxImageSizePlugin Global Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%
, for example,
%MAXIMAGESIZE_SHORTDESCRIPTION%
- One line description, shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Limit the size of images attached to TWiki topics
- Resize geometry
- Set RESIZE_GEOMETRY = "640x480>"
- Debug plugin: (See output in
data/debug.txt
)
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
- For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.
- Or, download the ZIP file from the Plugins web (see below),
- Unzip
MaxImageSizePlugin.zip
in your twiki installation directory. Content: File: | Description: |
data/TWiki/MaxImageSizePlugin.txt | Plugin topic |
data/TWiki/MaxImageSizePlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/MaxImageSizePlugin.pm | Plugin Perl module |
- Test if the plugin is correctly installed:
- Attach a larger jpg image to a topic and check the size.
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins