Generating thumbnails: how to get the filename of a static resource file

6 views
Skip to first unread message

Shanti Bouchez Mongardé

unread,
Oct 13, 2010, 2:44:26 AM10/13/10
to Webby
Hi,

For my blog I want to generate thumbnails, and I want to write a
helper. I just don't know how to translate a relative URL to a static
resource in a page to the full file name so that I can pass it to
ImageMagick to make a thumbnail.

Currently, I use Makefiles, but I'd like to integrate in webby. I'll
use the TeX helper to help me write my thumbnail helper. I might
contribute back when I have something good for use.

Also, is there a way to modify the static resources when moved from
the content directory to the output directory. The images taken from
my camera use an orientation metadata. It looks good in an image
viewer but not on a web navigator. i'd like to use ImageMagick again
to orient those images correctly.

Thanks you very much

Mildred - http://mildred.fr

Björn Andersson

unread,
Oct 14, 2010, 2:02:14 AM10/14/10
to webby...@googlegroups.com
Hi,

I made an image helper last year and what I did was figure out where I
wanted to save the images and then just look at those paths if the
image existed. In the page specs I just did: image('my-image.png',
'Alt text') and thumbnails were automatically generated.

For reference my ImageHelper module: http://gist.github.com/625658

/Björn

2010/10/13 Shanti Bouchez Mongardé <shanti....@gmail.com>:

--
"Beauty is more important in computing than anywhere else in technology
 because software is so complicated. Beauty is the ultimate defense
 against complexity."
   -- David Gelernter, Machine Beauty:
      Elegance and the Heart of Technology

Reply all
Reply to author
Forward
0 new messages