HighDots Forums  

How important are IMG size attributes these days?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss How important are IMG size attributes these days? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
darrel
 
Posts: n/a

Default How important are IMG size attributes these days? - 07-16-2004 , 03:27 PM






In the past, It was always fairly important to make sure you explicitely put
in size attributes for your images so that the page could render before the
image was fully loaded.

Is that still an issue these days, or do most browser render on the fly (in
the past, you often had to wait for all the conent in a table to load before
the table would render, so if you put in an image's size, it could 'reserve'
that spot.

The reason I ask:

I'm working on a .net component for our CMS that lets an end user upload an
image. I then size this image into different sizes like this:

800 pixels (full size)
400 pixels (regular)
100 pixels (thumbnail)

Now, the catch is that I can not guarantee that the image will be larger
than 800 pixels to begin with. So, if they upload a 600 pixel image, I'm not
going to upsize it to 800.

So, what to do on the front end?

I see two options:

1) Grab the image in the folder and just let the browser render it as-is

2) Grab the images width/height attributes on the server side (via .net) and
then send that to the browser to write out the IMG tag with the correct
width/height.

My question, I guess, is there really any performance difference between #1
and #2? #1 would obviously be a lot easier to develop on my end.

-Darrel



Reply With Quote
  #2  
Old   
cmbergin
 
Posts: n/a

Default Re: How important are IMG size attributes these days? - 07-16-2004 , 04:25 PM






The most irritating thing about size attributes is when they're wrong and the
image is streched out or compressed.

Other than that, the content will still render before the image is done
downloading, but it will shift and shuffle every time the next image's size
attributes are retrieved. It's pretty irritating when you're reading and the
paragraph jumps down 100 pixels because the browser started retrieving an image
above the paragraph you're reading. Pretty much only an issue on dialup unless
the images are huge.


Reply With Quote
  #3  
Old   
darrel
 
Posts: n/a

Default Re: How important are IMG size attributes these days? - 07-16-2004 , 05:21 PM



Quote:
It's pretty irritating when you're reading and the
paragraph jumps down 100 pixels because the browser started retrieving an
image
above the paragraph you're reading.
Ah yes...good point. Very good point, actually.

OK, well, I think that answers the question...they still are quite
important. I'll grab the image size on the server side and then write out
the HTML that way.

-Darrel




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.