This again - image resizing
This again - image resizing
Author
Discussion

Xenocide

Original Poster:

4,286 posts

237 months

Thursday 20th November 2008
quotequote all
Hiya,

Was thinking about all the comments recently regarding image resizing (and more aptly, resizing as they load making the page jump around).

Another forum I frequent has just implemented this system.

All posted images are given the "img" class. When they're quoted they're changed to "timg". Onload the dojo framework (js) is loaded and some code is ran. Disscussion can be found in this thread: http://forums.somethingawful.com/showthread.php?th...

(if you have an account or if that forum is open to the public)

And gives a rather snazzy effect: In this image you see the image posted and it quoted below. (Green border around image - been resized). Hover over the image and you get the dimensions, click it and it loads the original image.



Edited by Xenocide on Thursday 20th November 13:19

RacingPete

9,197 posts

233 months

Thursday 20th November 2008
quotequote all
Preamble: Haven't looked at the linked site but initial thoughts (that might be wrong)

So does it set the width and height for the img tag while the page is loading so that the pictures appear in the thread when they load with their sizes pre-rendered?

Xenocide

Original Poster:

4,286 posts

237 months

Thursday 20th November 2008
quotequote all
It *Doesn't* put if you specify a class for all the images - you could do it in the css then use that js to resize once loaded.

RacingPete

9,197 posts

233 months

Thursday 20th November 2008
quotequote all
But if you put it in the CSS you still couldn't guarantee the size of the image linked as these still would jump when the system resizes them (or do you have the size set to the max and leave the space round the picture when it is loaded?)

Suffering from really bad cold today and head is a bit fuzzy so might be being slightly stupid here smile