1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Rep Power

    Question Smart Image Sizing

    Hi Everyone,

    I'm working with a datafeed which I pull images from.

    The images are all in different sizes and I'm trying to show them in small 100x100 icons on my site.

    The problem is that most icons looks very bad because the original image is not a square and it gets distorted when I fit it to the dimentions of one.

    I would like to be able to change wide images to width=60px and tall images to height=60px.

    What whould be the best way (and easier on my server) to do this?
    Should I do this on the server side or maybe CSS could offer me that option?

  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Washington, USA
    Rep Power
    Probably server-side. If you need PHP code on how to do this, Google for generic image resizing: most things you'll find talk about using a maximum width or height rather than forcing both to a number (and thus skewing the image).

IMN logo majestic logo threadwatch logo seochat tools logo