[pmwiki-users] automatically generate image width/height?

Tegan Dowling tmdowling at gmail.com
Wed Dec 6 16:48:45 CST 2006


On 12/6/06, The Editor <editor at fast.st> wrote:
> On 12/6/06, Lucian Wischik <lu.gmane at wischik.com> wrote:
> > I wonder if it would be useful for pmwiki to inspect .gif/.jpg
> > images that it attaches, look at their headers, read their dimensions,
> > and use these dimensions to emit
> >  <img src="pic.gif" width=100 height=200>
> > for
> >  Attach:pic.gif
> >
> > That way the web-client would get the benefit of correctly-sized
> > image placeholders, the wiki author would get the benefit of
> > not having to specify image sizes, and it'd only impose a little
> > extra burden on the webserver to read about 100 bytes per image.
> >
> > Is such a thing already written? What do people think?
> >
> > --
> > Lucian
>
>
>
> Don't know if it's already been done, but I think it's a great idea!
> That's one thing I didn't like about moodle and some other systems I
> used.  The display seemed to jump around, reshaping itself as more and
> more of the page content loaded. Yuck!
>
> Don't have that problem so much with PmWiki because I have more
> control over the skin...  But the idea is the same.

If it were set up right, it might also allow me, as an editor, to say

(:if img-height>=img-width:)%width=200px%Attach:img.jpg%%
(:if img-width>img-height:)%height=200px%Attach:img.jpg%%(:ifend:)

so I could be sure that, regardless of the image's portrait/landscape
orientation, the larger of the two dimensions would be no more than
200px (or whatever my target maximum might be).




More information about the pmwiki-users mailing list