|
| |
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: offline
|
Specify image size? - 12/26/2007 13:20:19
If you have an image that is supposed to be displayed using it's default size, what's the point of specifying the size in the HTML code for the image? What are the downsides?
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Specify image size? - 12/26/2007 18:06:51
How do you know it renders faster with the extra HTML that specifies the size? Did you read about this somewhere? Did you test it yourself?
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
Tailslide
Posts: 5915 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Specify image size? - 12/27/2007 4:30:21
I agree with Jaybee - if you don't add the height/width you end up with the page elements shifting around to make room for the images. The only time I wouldn't add image dimensions into the HTML would be if I was deliberately stretching an image to 100% of a div for some reason (not a background image) and then the div would have a measurement of some kind anyway.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Specify image size? - 12/27/2007 11:14:08
In most cases, divs have a specified width, but not always a height. The only thing that would shift is the text inside the fixed width div, right? Anyone know of a FF extension to downgrade your download speed to test this out?
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
caz
Posts: 3470 Joined: 10/10/2001 From: Somewhere south of Chester, UK Status: offline
|
RE: Specify image size? - 12/27/2007 13:38:48
You could try the speed report in Tools on the Web Developer toolbar.
_____________________________
Do not meddle in the affairs of cats, for they are subtle and will dance, or more on your keyboard. Cheshire cat. www.doracat.co.uk I remember when it took less than 4hrs to fly across the Atlantic.
|
|
|
|
Tailslide
Posts: 5915 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Specify image size? - 12/27/2007 13:40:11
Not sure I understand you Bobby - maybe we're talking about different things because this is a basic "given" surely... Without dimensions the page will try to structure itself. Usually you'll get text etc first which will take up maximum allowed space. Then the images will finish downloading and the text etc will then have to make room for it thus shifting around which is a really ugly effect. If you have the dimensions in the markup then the text (I'm saying text just for argument's sake) will know how big the image is and will make space for image in the first place without shifting around - therefore the page is downloaded in it's final form more quickly than if you don't use dimensions as you don't need to wait for the images.
< Message edited by Tailslide -- 12/27/2007 13:46:16 >
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
mtfm
Posts: 414 Joined: 1/13/2006 From: Mesa, AZ Status: offline
|
RE: Specify image size? - 12/27/2007 15:40:53
interesting stuff. But a question, if I may... other than download speed, is there any other reason to have dimensions listed? I have been leaving my dimensions off, if for nothing else than for flexibility. I make an intraweb, and many liks are images and whatnot that are sometimes held by other people or departments, and subject to change without notice. If I specified the size, and then they swapped the picture out for a smaller one, the new picture would look weird.
_____________________________
Is this possible? How about this? What about....?
|
|
|
|
Tailslide
Posts: 5915 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Specify image size? - 12/27/2007 15:59:12
If you're in that situation and can't change the dimensions dynamically then you probably just have to live with the shifting page. The disadvantages are offset by the advantage of not including them. For a "normal" website it's usually best to include the dimensions.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Specify image size? - 12/27/2007 19:37:05
The only thing I've known/tested is that images that lack the specified size, will move other elements(usually text) around as the image is resized to the full size it is supposed to be. So really, this comes down to users on slow connections. However, despite the moving of text, it should take less time to load the entire page, because you are loading less content without specified sizes. But then you have to look at the extra time it takes for the entire page to render. Which is quicker?
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|