navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Specify image size?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Accessibility >> Specify image size?
Page: [1]
 
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
jaybee

 

Posts: 13972
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Specify image size? - 12/26/2007 14:59:19   
The browser renders faster if you tell it what size to display the image rather than let it figure it out for itself. If it's just one image it doesn't make a lot of difference but if there are many images then it does.

Plus, if you're using css for layout then not specifying the size can affect what displays especially if you're using floats.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to BobbyDouglas)
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

(in reply to jaybee)
jaybee

 

Posts: 13972
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Specify image size? - 12/26/2007 19:05:53   
No I just made it up. :)

It's one of the basic lessons of Web 101. The browser has to layout the page, if you tell it what goes where and what size it is then it can do it faster than if it has to work it all out.

If you have fast Broadband and you're using css for layout then it's not obvious but if it's table layout and you're on dial-up you can see it happen. It starts to layout the table then things start to shift around the page.

< Message edited by jaybee -- 12/26/2007 19:17:36 >


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to BobbyDouglas)
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

(in reply to jaybee)
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

(in reply to Tailslide)
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.

(in reply to BobbyDouglas)
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

(in reply to BobbyDouglas)
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....?

(in reply to Tailslide)
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

(in reply to mtfm)
womble

 

Posts: 5461
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: Specify image size? - 12/27/2007 16:27:20   
This discussion's just reminded me of one of Jaybee's posts the other day about Firefox 3 and ditching scaling text for zoom text. Would the new zoom feature have any effect on the enlarging of images, perhaps providing a further reason for why dimensions should be specified, or does it purely affect text?

quote:

interesting stuff. But a question, if I may... other than download speed, is there any other reason to have dimensions listed?


I've been looking around to see if there's any accessibility reason why image dimensions need to be specified (there's plenty of references to how it helps a page render faster, but nothing on accessibility), and the only thing I can think of is that for anyone using magnification software it could be very disorientating if page elements keep shifting around where image sizes aren't specified. It can be disorientating enough using a magnifier on a 'busy' page without bits of the page shifting around as it renders.

_____________________________

~~ "A cruel god ain't no god at all" ~~
:)

(in reply to Tailslide)
jaybee

 

Posts: 13972
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Specify image size? - 12/27/2007 17:46:16   
Zoom magnifies the entire page, including images which means if your graphics are low res they get very pixelated.

Or, to be accurate, it's meant to zoom the entire page but in IE it's pretty random as to the results.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to womble)
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

(in reply to jaybee)
Page:   [1]

All Forums >> Web Development >> Accessibility >> Specify image size?
Page: [1]
Jump to: 1





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