Submit Your Article Forum Rules

Results 1 to 7 of 7

Thread: Databases and Images

  1. #1
    Junior Member
    Join Date
    Jun 2005
    Posts
    3

    Databases and Images

    I have an asp web page that allows a user to request textual information from an Access Database, the results of this request are then displayed on a second asp web page.

    What I want to happen now is that a thumbnail image is also called from the results of the users request, this thumbnail image then needs to have a hyperlink associated with it so that the user can click on it and see the full size image.

    I don't want to embed these images into the Access Database as there are quite a few.

    Any suggestions?

  2. #2
    Senior Member ADAM Web Design's Avatar
    Join Date
    Dec 2003
    Posts
    2,172
    I run into this situation quite a bit, and here's what I do:

    1) Create six fields in your textual information table: Picture, Picture_Width, Picture_Height, Thumbnail, Thumbnail_Width, Thumbnail_Height .

    2) Put the corresponding values for each picture/thumb into those six fields in your table. Make sure you put the widths/heights in too. You'll need those so that your page won't take as long to render as it tries to figure out how big the pics are for you (it's better coding practice too!)

    That's really all there is to it.

  3. #3
    Junior Member
    Join Date
    Jun 2005
    Posts
    3

    Databases and Images

    Thanks ADAMWebDesign, I'll give it a go.

  4. #4
    Senior Member richkoi's Avatar
    Join Date
    Aug 2003
    Posts
    441
    I make all my images the same size and then imbed some php into the site to display the images:

    <a href="javascript:popUp('productpopup.php?CODE=<? echo $CODE; ?>')">

    [img]images/thumbs/<? echo $CODE; ?>.jpg[/img]

    </a>

    Rich

  5. #5
    WebProWorld MVP brian.mark's Avatar
    Join Date
    Jul 2004
    Posts
    2,709
    I just read the image with ImageMagick and then figure the heights and widths. Sure beats getting a wrong value in the database, and it has a lot more flexibility than making them all the same size.

    Brian.
    ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies

  6. #6
    Senior Member richkoi's Avatar
    Join Date
    Aug 2003
    Posts
    441
    What is the need of defining the image width and height in the database? When coding it into the site you just leave the image height and width out of the code and it will automatically display to the image specs.

    Rich

  7. #7
    WebProWorld MVP brian.mark's Avatar
    Join Date
    Jul 2004
    Posts
    2,709

    H & W

    Quote Originally Posted by richkoi
    What is the need of defining the image width and height in the database? When coding it into the site you just leave the image height and width out of the code and it will automatically display to the image specs.

    Rich
    Height and width make pages render faster. Especially for those with dial-up. Broadband probably doesn't need it as much.

    Brian.
    ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies

Similar Threads

  1. Invoiced from Getty Images for Unlawful Use of Images?
    By danners02 in forum Graphics & Design Discussion Forum
    Replies: 119
    Last Post: 01-04-2011, 01:11 PM
  2. Site images or... Will my ranking falter if I change all my images?
    By nipplecharms1 in forum Google Discussion Forum
    Replies: 4
    Last Post: 02-20-2008, 12:06 PM
  3. 2 databases
    By jazzmatazz2005 in forum Database Discussion Forum
    Replies: 4
    Last Post: 05-18-2007, 03:00 PM
  4. Keeping Yourself Out of Web And Other Databases
    By WPW_Feedbot in forum Search Engine Optimization Forum
    Replies: 0
    Last Post: 10-03-2005, 04:00 PM
  5. I know what databases can do...
    By richkoi in forum Database Discussion Forum
    Replies: 2
    Last Post: 06-17-2004, 10:45 AM

Posting Permissions

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