image "containers"
Author
Discussion

Davi

Original Poster:

17,153 posts

249 months

Thursday 6th November 2008
quotequote all
This may be completely impossible, but thought I'd ask anyway...

Is there any way that images posted in threads could have sized containers download before the images - so that the page layout is compiled first? On many threads we get quite picture heavy, problem is that trying to read any posts after a bunch of images you have to wait for the whole page to download, so page keeps jumping as each image starts loading in turn.

If that makes any sense (sorry, no sleep and being generally thick are not helping me vocalise my thoughts today)

RacingPete

9,197 posts

233 months

Thursday 6th November 2008
quotequote all
Reading you loud and clear smile

This is quite tricky as the images are all hosted remotely, so to know the sizes we would need to go and find them out from the hosted image and then format the page based on that data before loading the page. This would then slow down page processing with the extra calls to the images, and also mean that the page load would be dependant on the slowest image being returned (and as they are linked to any tom, dick and harry site it could be on a very slow server).

I will have a think about it though and see if I can think of another way around this problem.

Davi

Original Poster:

17,153 posts

249 months

Thursday 6th November 2008
quotequote all
Ahhh. yes. that would be a rather major flaw in my plan hehe

Good to see someone is able to comprehend me at the moment though!

PetrolTed

34,468 posts

332 months

Thursday 6th November 2008
quotequote all
Currently there's a javascript that works through a page and reduces large images to 640px (I think) wide.

The default div for images could be set at 640px wide so that they are scaled by the browser automatically...?

That might stop pages being overwide until fully loaded.

RacingPete

9,197 posts

233 months

Thursday 6th November 2008
quotequote all
Agreed, but I read the problem as the height of the images makes a page jump around as it loads... especially when viewing on a phone or if the images are running slow and you are trying to scroll through it and read it and suddenly everything shifts around.

Will look at the Div though smile

PetrolTed

34,468 posts

332 months

Thursday 6th November 2008
quotequote all
Ah yes, I see.

Don't know the answer then smile

Davi

Original Poster:

17,153 posts

249 months

Thursday 6th November 2008
quotequote all
yes the overly large images can be irritating with the width on loading, but it's the height that really gets annoying when not on a super fast connection, just as you get half way through reading a post it all jumps off the screen again.

Xenocide

4,286 posts

237 months

Thursday 6th November 2008
quotequote all
PetrolTed said:
Currently there's a javascript that works through a page and reduces large images to 640px (I think) wide.

The default div for images could be set at 640px wide so that they are scaled by the browser automatically...?

That might stop pages being overwide until fully loaded.
Wouldn't work though unfortunatly. If you have the div set to 640px, the image would start loading, stretch the div, image would load, onload event fired and image resized.

unless you floated the images over the div, then resized to fit the div width wise, get the dimensions of the image and fit the div to the image height.

PetrolTed

34,468 posts

332 months

Thursday 6th November 2008
quotequote all
You could let them scroll within the div. Not much of a solution though.

Perhaps rescale all images to 150px with a click to expand to original size... still some scenarios that would break that though.

ThatPhilBrettGuy

11,810 posts

269 months

Friday 7th November 2008
quotequote all
If you fancied lots of work there's a solution that would work most of the time.

When the poster submits, you do the lookup of the linked image sizes at that point, then cache them somewhere. That way you only have the pain of lookup once, at submit time, and any delay is just the posters delay, not the thread reader.

Cheque's in the post I assume wink

PetrolTed

34,468 posts

332 months

Friday 7th November 2008
quotequote all
We should probably just encourage greater use of the 'thumb' tag.

Xenocide

4,286 posts

237 months

Friday 7th November 2008
quotequote all
Floating images would be the best bet, thinking about it, then when the image has loaded, call an onload event to resize the image and the to fit div round it.

RacingPete

9,197 posts

233 months

Friday 7th November 2008
quotequote all
Xenocide said:
Floating images would be the best bet, thinking about it, then when the image has loaded, call an onload event to resize the image and the to fit div round it.
This would still cause the problems of the page jumping around as it has to still resize the image after page load - (that is if I understood what you said being it a Friday smile)

Xenocide

4,286 posts

237 months

Friday 7th November 2008
quotequote all
RacingPete said:
Xenocide said:
Floating images would be the best bet, thinking about it, then when the image has loaded, call an onload event to resize the image and the to fit div round it.
This would still cause the problems of the page jumping around as it has to still resize the image after page load - (that is if I understood what you said being it a Friday smile)
It would but it would only do it once (if you resize them all at once..) rather than lots.

Don't think it's going to be an easy one to get around either way frown

Furyous

25,686 posts

250 months

Friday 7th November 2008
quotequote all
Better than that, is it possible to have an automatic thumbnailer for those threads where someone posts about 10 pictures and somebody then quotes the whole damn post with a stupid "+1" as a reply.

We get some very interesting photo threads on here but the quoting of them and the issue stated above are really annoying to say the least.

2 sMoKiN bArReLs

32,001 posts

264 months

Friday 7th November 2008
quotequote all
PetrolTed said:
You could let them scroll within the div.
Trouble is, there are so many divs on here it may get confused

MBH etc etc biggrin


RacingPete

9,197 posts

233 months

Monday 10th November 2008
quotequote all
Furyous said:
Better than that, is it possible to have an automatic thumbnailer for those threads where someone posts about 10 pictures and somebody then quotes the whole damn post with a stupid "+1" as a reply.

We get some very interesting photo threads on here but the quoting of them and the issue stated above are really annoying to say the least.
That is something we are looking into as I agree it isn't necessary. Though it wont save any bandwidth or speed it should make things easier to read.