Thumbs

Summary: Thumbs for images
Version: none - built in to PmWiki
Prerequisites: PmWiki 2.5.0-2.5.5 only
Status: complete
Maintainer: gnuzoo
License: PmWiki License
Categories: How To
Users: --gnuzoo
Discussion: Thumbs-Talk

 

Warning: This recipe abuses what is considered a bug existing in some PmWiki versions. It may not work with the current or future PmWiki versions.

Questions answered by this recipe

How to make thumbs of images without using and addon, no config.php, no cookbook recipe, nothing but PmWiki itself

All sections are optional, you can remove those that do not apply to your recipe, and add new ones.

Description

The most easy to use image thumbs using what pmwiki has already has
no addon, no config.php, no recipe, nothing - just toss a bunch
of image references into a div.

It works but cannot add tooltips or captions. IMHO bandwidth has
gotten so fast that most websites do not need to cache mini images,
sticking weird files with weird filenames all over the place and
making a mess.

This may not work very well if your internet connection is
very slow and your images are extremely high resolution and
huge in file size or if you have a gazillion images, but it will
probably work for everthing. I estimate that for 99% of users this
will work perfectly.

Installation - not required

Configuration - not required

Usage

This makes use of a PmWiki feature (unintended behavior)
that when an image URL not inside a link of form "[[ link|image ]]"
but is on the page as plain text such as

    %height=100px%http://localhost/z/[=file1.jpg=]

and notice the filename is inside escapes -- [=filename.jpg=]

PmWiki displays the image and makes it a link to the image itself.
When clicked it displays the image at full size.

Normal display of images can include a tooltip and caption text like this:

    http://localhost/z/file1.jpg"TOOLTIP TEXT"|CAPTIONTEXT

Using this thumb images method the tooltips and captions do not work.
Images for thumbs will flow left to right and then wrap the the next row.
Clicking shows original image at full resolution in a new tab - works great!
Filename with spaces are clickable.

(:I:%newwin height=100px display=block%https://www.pmwiki.org/pmwiki/uploads/Cookbook/:)
(:div style="display: flex; flex-wrap: wrap; gap: 5px;":)
{$:I}[=marine corps.gif=]
{$:I}[=ComplexTable1.png=]
{$:I}[=crystal-tux-rt.png=]
{$:I}[=SimplePlaylist.webp=]
{$:I}[=Movie.jpg=]
{$:I}[=photogallery_screenshot.jpg=]
{$:I}[=quicktocclosed.jpg=]
{$:I}[=scaffolding.jpg=]
{$:I}[=SunnyslopeAfricanDaisies.jpg=]
{$:I}[=Winter.jpg=]
{$:I}[=windfarm.jpg=]
{$:I}[=wikilovescreen.jpg=]
{$:I}[=VTX1300S-Retro.jpg=]
(:divend:)

To do / some day / maybe

If you have future plans or wishes for this recipe.
Petko mentioned that he may try to fix this PmWiki feature (unintended behavior)
but until then, this is a great way to make thumbs of images.

I think he should allow this feature to continue, but fix the tooltips and captions.
Perhaps he could create a new markup just for images to link to themselves and still
use tooltips and captions.

Change log / Release notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also

Contributors

--gnuzoo

Comments

See discussion at Thumbs-Talk

User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.