Image resizing

On my class forum, we’re having a discussion about how to resize image on a web document. As far as I know, there are three methods:

  • Client-Side resizing (eg. <img ... height="120px" width="200px" /> )
  • Server-Side resizing (eg. <?php echo "<<img ... heigt="$myheight" width="$mywidth" />"; ?> )
  • CSS resising (eg. img.thumbnail { height: 120px; width: 200px; } )

Let’s forget about the second one, too easy. However, the two others are tricky.

Does the fact that the image is resized change the content or the presentation of the page. What do you think?

There are 10 comments yet. Don't be shy.

1. On July 6th, 2005 at 5:00 pm, Joe said :Joe's gravatar

Presentation. It’s still the same image.

2. On July 6th, 2005 at 6:45 pm, Remi said :Remi's gravatar

I’d rather say it depends on the document as well. I was not asking you which of “content” or “presentation” was the right one ;)

3. On July 6th, 2005 at 8:09 pm, septor said :septor's gravatar

You could save all this bull and just make the image the size you intend to use…

4. On July 6th, 2005 at 10:57 pm, Remi said :Remi's gravatar

Patrick, I mean, to dynamically resize it.

5. On July 7th, 2005 at 11:53 am, septor said :septor's gravatar

Why would you want to? Unless you’re ripping images, which is wrong =D

I guess if I were to ever become “lame” I would probably use the first method, as it uses the least amount of effort. The second way would work dandy, except it’s more or less the same way as the first, so wtf? The third is stupid, unless you plan on resizing more than one image, no sense in making a class for one image ;]

6. On July 7th, 2005 at 1:09 pm, Remi said :Remi's gravatar

If you make a photo gallery with only thumbnails, which can be clicked to be displayed in full size, in a popup window. You use the same image for the thumbnail and the fullsize image.

Then, you’ll need something to resize the fullsize image to make a thumbnail, won’t you?

7. On July 7th, 2005 at 3:17 pm, Joël said :Joël's gravatar

The best imho is a combination of 2 and 3. First you heck the actual size of the image to determine if it needs to be resized. Then, if needed, you assign a class to resize it.

It’s just about presentation, not content - unless you consider the fact of using one image instead of two is “content”…

Oh, and what about client-side, dynamic resizing through javascript, too? (for example, if the screen is larger than 1024, don’t resize, and so on…)

8. On July 7th, 2005 at 3:50 pm, septor said :septor's gravatar

ImageMagick.

9. On July 7th, 2005 at 7:48 pm, Remi said :Remi's gravatar

Image–What?

10. On July 8th, 2005 at 8:33 am, septor said :septor's gravatar

Google =D


Sidebar