Results 1 to 4 of 4
Thread: quick Q re: HTML and images
-
03-13-2005, 02:26 AM #1Junior Guru Wannabe
- Join Date
- Apr 2003
- Posts
- 58
quick Q re: HTML and images
Is it true that when using the HTML IMG tag, that unless you specify the height and width of an image, the page will not display until the image has been loaded?
Im asking because I need to create a page where alot of thumnail images are displayed. These thumbnails will not all be the same size, so Id like to know if I should store their height and width in the Database, in hopes that the thumbnail page will load faster if I specify the height and width of each image in the IMG tag.
Thanks for any help.
-
03-13-2005, 06:49 AM #2Web Hosting Master
- Join Date
- Mar 2003
- Posts
- 879
Re: quick Q re: HTML and images
Originally posted by jen66772
Is it true that when using the HTML IMG tag, that unless you specify the height and width of an image, the page will not display until the image has been loaded?
This pretty much have to do with the way you save your images.
For png and gif (Hope i got them right), when you save your images, if you want quick displaying, you should alway use "interlace"
Have you seen web pages dispaying their images from blur... then clearer.... and clearer... that is it!!
i think a similar thing goes for jpg... IIRC is "progressive"
-
03-13-2005, 06:52 AM #3Web Hosting Master
- Join Date
- Mar 2003
- Posts
- 879
Re: quick Q re: HTML and images
Originally posted by jen66772
Im asking because I need to create a page where alot of thumnail images are displayed. These thumbnails will not all be the same size, so Id like to know if I should store their height and width in the Database, in hopes that the thumbnail page will load faster if I specify the height and width of each image in the IMG tag.
Thanks for any help.
The trick of specifying width and height WONT work.... the FULL pics will be downloaded!!
Are u using php??
IF yes!! phpThumb() is your answer...look no further
If not, then you can search for similar functions for the other languages
-
03-13-2005, 06:55 AM #4Junior Guru
- Join Date
- May 2004
- Posts
- 238
Yes and no.
I find out from experience, you can workaround it by writing a script to do that.
An example is at http://www.uptimestatus.com/viewstat.php?a=1&u=1
We face the same problem in our monitoring service graph as the width of the image is not pre-determined.
Sorry, I can't give you any example code although I wrote the script.
Nevertheless, I'm sure you can find some example in the internet if you search hard.Art of Mobile: A place for mobile resource