images2Add my vote for this tag create new tag
, view all tags

Max Image Size Plugin

Limit the size of images attached to TWiki topics


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


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)
    • Set DEBUG = 0

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

Plugin Author: TWiki:Main.MartinCleaver
Copyright: © 2003 TWiki:Main.MartinCleaver, © 2008-2011 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2011-02-23
Change History:  
2011-02-23: TWikibug:Item6638: Fix for TWiki-5.0; doc improvements; changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
2003: Initial version
CPAN Dependencies: http://www.imagemagick.org/www/perl.html
Other Dependencies: Image Magick
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/MaxImageSizePlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/MaxImageSizePluginDev

Related Topics: TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 MaxImageSizePlugin.md5 r1 manage 0.2 K 2011-02-24 - 07:59 PeterThoeny  
Compressed Zip archivetgz MaxImageSizePlugin.tgz r1 manage 4.4 K 2011-02-24 - 07:58 PeterThoeny  
Compressed Zip archivezip MaxImageSizePlugin.zip r2 r1 manage 5.8 K 2011-02-24 - 07:58 PeterThoeny  
Unknown file formatEXT MaxImageSizePlugin_installer r1 manage 3.4 K 2011-02-24 - 07:58 PeterThoeny  
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.