[pmwiki-users] AutoResize image files???

Tegan Dowling tmdowling at gmail.com
Tue Nov 21 08:39:15 CST 2006


On 11/21/06, Nicholas Buttle <nicholas_buttle at yahoo.com> wrote:
> Hi
>
> I just did an upload of an image file for display on a
> page however it has remained 1600 X 1200 which is far
> too big and looks rediculous.
>
> Is there any way of converting all image files into
> thumbnails which can then be clicked on to see the
> full size image?

Hi, Nicholas:

There is not yet a PmWiki recipe for resizing images, as far as I
know.  I'm sure there would be many grateful users if there were.  In
the meantime, you can use a combination of other approaches.

1) you can control the displayed dimensions of the large image, so
that it occupies a visually appropriate portion of your page (it's not
clear from your question whether you've discovered this).  For
instance, you can specify image display with a width of 200 pixels by
prefixing the "Attach:" markup with formatting instructions -- thus:
%width=200px%Attach:Group/Page/image.jpg%%
The wiki will scale the image-display, setting the height in
proportion to the width.  Or you could use
%height=200px%Attach:Group/Page/image.jpg%%

NOTE that you would not want to use this approach for more than one or
two images per wiki page, because this method of scaling down the
display of the image does NOT change the fact that the visitor's
browser must download/process each image in full.  Several large
images so displayed on one page could easily crash the browser of a
dial-up visitor.

2) you can upload two versions of the image -- one full-sized, and one
"thumbnail", and use the "thumbnail" in place of the link-text in a
link to the full-sized picture (you could actually use this technique
with the method above, as well, but with the same issues as above).
%width=200px%[[http://www.AddressOfFullSizedImage/uploads/Group/image.jpg
| Attach:Group/Page/image-thumb.jpg]]%%
(to get the address of the full-sized uploaded image, right-click on
it and look at its properties, OR go to the Uploads view of a page in
the group to which it is uploaded, and right-click on the link to it).

3) To create the thumbnail-sized version: A) you can resize images
online for free at snipshot.com; B) If you use WindowsXP, you can
download Microsoft's Image Resizer powertoy, (article here, with link
to download: http://www.microsoft.com/windowsxp/using/digitalphotography/learnmore/tips/eschelman2.mspx)

 4) Another option -- put the full-sized image on its own page (this
gives you the opportunity to add description, discussion, etc. to the
page along with the image), and link to that page with the thumbnail
as link-text, as above:
%width=200px%[[Group/PictureNamePage |
Attach:Group/Page/PictureNameThumb.jpg]]%%

5) NEW:  pop-up the full-sized image in a new window -- install the
PopupWindow recipe. Use setup 2 or 4, above.
%width=200px%%popwin%[[LinkToLargeImageOrPage | Attach:Thumb.jpg]]%%

Hope that helps - ask if you'd like further clarification of any part of it.

Tegan




More information about the pmwiki-users mailing list