Results 1 to 4 of 4
  1. #1
    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.

  2. #2
    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?
    NO.
    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"

  3. #3
    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.
    I know what you mean.
    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

  4. #4
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •