[dokuwiki] Re: Request for an improvement - allow % sizes for images - please!

  • From: Chris G <cl@xxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 17 Feb 2011 10:45:57 +0000

On Thu, Feb 17, 2011 at 11:00:30AM +0100,  Mª®k wrote:
> 2011/2/13 Chris G <cl@xxxxxxxx>:
> > It's really awkward not being able to specify image sizes as percentages
> > rather than absolute pixel sizes in Dokuwiki.
> >
> > I create most of my Dokuwiki pages using a screen which is 1980 pixels
> > wide so images need to be 1000 or even 1200 pixels wide at least to be
> > useful in Dokuwiki pages.  However I then want to be able to view the
> > same pages on my laptop so the images need to be only 500 or so pixels
> > wide.
> >
> > If I could specify a percentage of window width (easy enough in the HTML
> > as % is recognised) it would make life a whole lot easier.
> >
> the image size in dokuwiki is a (serverside) resize parameter for the
> external resource the is loaded as part of the rendering process of
> the page (the width/height of the page is unknown to the server
> serving the image),

Is that really right, I'm talking about the 'thumbnail' image that appears
actually in the Dokuwiki page, not what you see if you click on the image.
I have an image on one of my Dokuwiki pages as follows:- 
    {{diagrams:200and800.png?295 }}

If I view the HTML source generated by this I see:-
    class="media" title="diagrams:200and800.png"><img
    src="/_media/diagrams:200and800.png?w=295" class="medialeft"
    align="left" alt="" width="295" /></a>

I.e. the 295 I have specified ends up directly as the width
specification in the HTML.  All I want is to be able to specify 50%
instead of that 295 so the image will be half the browser screen width.

> Specifying width/height for an image as part of the html tag is a
> styling/rendering hint for the user agent deviating from the natural
> size will lead to degraded rendering

The 'natural' size is way too big, I have to scale it down anyway,
otherwise it doesn't fit on even my 1980 pixel wide screen.  I'm not
after perfect rendering, I'm after practical ways of getting to see my
images (these are wiring diagrams mostly) on screen so I can refer to
them when grovelling around in the nether regions of my boat etc.

Chris Green
DokuWiki mailing list - more info at

Other related posts: