When loading an image, create a smaller image on the page, with a link to a larger image.
The Minimage module : Please report any problem in the discussion paragraph below or by mail.
Add the following line to local/config.php
If default dimensions are not ok for you, you can impose the dimensions by setting
Note: the use of '.' as separator for size characterization is no longer accepted. You should remove it to still have working links. - Sorry for that, see the discussion for explanation -
Image type is limited to jpeg, gif and png. When clicking on the Img call, a screen will open to invite you to upload your image and create or modify IPTC tags.
After validating the input, the images are resized and stored on the harddrive.
To force resizing of an existing image, use a leading star (*), which should be removed later:
Tip: to resize an image, edit the page, add the dimensions to be forced, make a preview, which will drive to image recalculation (not shown because the image is still in the cache), cancel the edit, and force the reload of image with [Shift] + reload button. That way, you have nothing to remove...
If the small image is of same size as the plain image, there will be no link to the plain image. So by example :
will simply display the image with a dimension of 350 pixels.
There is no size limitation (but your server probably have limitations), but wrong files will be automatically deleted, and too large source images will be resized.
This script do not resize images lower than (1.15 * required size) -to limit quality loss when image is slightly larger than required. This coefficient can be modified (parameter $OverSize).
Site example :
You can also load images by FTP. They will be resized at first display. In that case, the IPTC tags will be the defaults for caption and special instructions, and the copyright owner will be the first one to display the images... (read on the author cookie). For files loaded via FTP, image extension shall be in lower case.
If plain image is of same size as the archive image, the archive will be automatically deleted.
On PmWiki2 only. Need to have the GD library installed in a version above 2.03 (to allow image resampling). This library is part of the PHP distribution but not always installed, because it is delicate to install, and also use significant server resources. If resizing not possible, a message will be displayed.
Needs to have PmWiki uploads enabled. The password is the upload password. Storage directory is the same as for upload.
#$WriteGif=FALSE; // Force inactivation of Gif writing # (default TRUE, but check function existence) #$DispIPTC=FALSE; // Stop interactive IPTC input (default TRUE) $img_smallsize = value; //Larger size of displayed image,default 256 $img_plainsize = value; //Larger size of linked image, default 768 $img_archsize = value; //Max size of archive on drive, default 1280 ## Setting archive size equal to linked size remove archive files #$OverSize = value;//extra size which do not allow resizing,default 1.15 ## Default IPTC tags (jpeg images only) $def_iptc_caption = 'text'; # if no caption tag exist, default 'Image collected on a PmWiki' $def_iptc_copyright = 'text'; # if no copyright tag exists and no Author defined, default empty $def_iptc_special = 'text'; # *appended* to existing special instruction tag, default empty. # Maybe used to defined a site licence (cc or artistic or whatever).
When interactive IPTC tags are unactivated, parametered values are used, and the Author (as defined in the cookie) is set as copyright owner, if no default author set. To unactivate author setting, set a '-' or any char as default author.
The strings to be translated are defined in the PmWiki.XLPageCookbookTemplate page, which is used to create any local XLPageCookbook page.
Explanation and user documentation :
See also this page translated :
See discussion at ImagesAutoResizing-Talk