[dokuwiki] Image crop vs. resize in Dokuwiki

  • From: Daniel Dupriest <kououken@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sun, 7 Nov 2010 16:09:50 +0900

Hello all. I've a quick question regarding image cropping vs. resizing.

Image resizing in Dokuwiki seems to be inconsistent depending on whether the
image is internal or external. ie:

{{photos:foo.jpg?100x100}} will resize an internal dokuwiki image to the
larger of the dimensions, cropping the portion that overflows the smaller
dimension. This results in a cropped, but height/width ratio-preserved
image.

whereas

{{http://myserver.com/somephotos/foo.jpg?100x100}} will resize both width
and height to the specified 100px, ignoring height-width ratio and resulting
in a squished image.

In my case I was trying to resize and display links to images on my own
server, but external to Dokuwiki's media dir.

Is there a reason why these two images should be resized differently? And if
not, could Dokuwiki's image resizing syntax maybe include a way to specify
which to use? Such as "?100x100" resizing exactly (destructive to h/w ratio)
and "?100X100" resizing allowing cropping.

Best regards,
-- 
Daniel  ( ̄ー ̄)b
--

Other related posts: