Adding Photos To Website

Discussion in 'Web Design and Development' started by JackT06, Nov 28, 2009.

  1. JackT06 macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #1
    I am currently setting up my own photo website. Of course one thing which im going to need is to be able to put photos what i plan on doing is making little thumbnails but how do i do this at the moment i use this code
    Code:
    <a href="http://i457.photobucket.com/albums/qq292/JackT06/nz431722.jpg" target="_blank">
    <img src="http://i457.photobucket.com/albums/qq292/JackT06/nz431722.jpg" width="100" height="131" border="0" alt="Photo of a big bunny rabbit!" />
    </a>
    But the problem is that when i put that code onto my website the little thumbnail doesnt look right because of the pixels. Can anyone recommend a better way?
     
  2. NathanCH macrumors 65816

    NathanCH

    Joined:
    Oct 5, 2007
    Location:
    Stockholm, Sweden
    #2
    The code looks right. What do you mean "because of the pixels"? I'm guessing the problem is that resizing a large image via code is causing it to not only load slowly, but look bad too.

    What you should do is resize each image in photoshop first. Or you can use Automator and do a bunch of images at once.

    There is PHP code that can create thumbnails for you and auto post. But I think it may be too complex at this stage.
     
  3. JackT06 thread starter macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #3
    Ye its loading slow and also looking bad because all the pixels have been squashed together.

    Ye i will try and use Automator to resize a few and see what the output is.

    Ye im not to familiar with PHP
     
  4. Consultant macrumors G5

    Consultant

    Joined:
    Jun 27, 2007
    #4
    Remove height and width code if that produces an image that is not the right ratio.

    Also, you want to host the images on your own server. Photobucket will remove the images if too many hits / hot link.
     
  5. JackT06 thread starter macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #5
    Ye i put the images through atomater and then removed the height and width and its fine now thanks :D.

    Oh right, thanks for telling me i didnt know that. Gota find somewhere to host my site now :D
     
  6. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #6
    Just thought I'd throw this in for good measure...

    If you find a webhost supporting PHP and GD graphics library, you can automate thumbnail creation by following the advice on this page:

    http://www.phptoys.com/e107_plugins/content/content.php?content.46

    It includes instructions on GD, the PHP commands to the resize, and most importantly the proper formula to resize and maintain the aspect ratio of the image at the same time. For example, upload one or more images and process each image with a script that automatically creates the thumbnails for you as well as the gallery.

    FYI

    -jim
     

Share This Page