Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Digital Image Question for Webmaster:

HTML or JavaScript Solution Needed!



8:03 pm on Aug 11, 2001 (gmt 0)

Inactive Member
Account Expired


I have a lot of images on my website that are all the same size, but different orientation. Some are 160x120 pixels, and others are 120x160 pixels. Right now, I am Specifying the height and width for each image, but what I would like to do is set the MAXIMUM size to 160 pixels, so that every image will be displayed properly without all the extra work. Does anyone know if this can be done in HTML or with a JavaScript, etc.? I would really appreciate any help with this question.
8:20 pm on Aug 11, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 3, 2001
votes: 0

You don't need to specify the image size at all. They will just display "as-is".


9:20 pm on Aug 11, 2001 (gmt 0)

Inactive Member
Account Expired


Thanks for the help, but I am actually using the images in a chart, and if I don't specify the size of each image, it goes all wonky! Good thinking, but I don't think that will work in my case! Any more ideas -please?
12:13 am on Aug 12, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 6, 2000
votes: 0

If you're talking about using an HTML table as the structure for a display 'chart' of thumbnail images, I can think of two options:

1. Setting each table cell size to 160 pixels square, and letting the leftover space fall where it may...

2. Checking cgi script sites for a 'thumbnails' script that will automatically generate a thumbnail display 'gallery' from your existing full-size images. Thanks to the wide sucess of @dult photo galleries online, there are a suprising number of such automated scripts available, most likely perfectly usable for more legitimate venues.

6:11 am on Mar 7, 2002 (gmt 0)

Administrator from US 

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 1999
votes: 17

1 is not a real good approach since it will overflow the text on some browsers (the image will display in it's default size if not specified and flow over the borders of your tables - most apparent with IE)

I don't see any way to do it how the original poster suggested.

4:56 pm on Mar 20, 2002 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2002
votes: 0

there **could** be a way, although it's a bit dodgy.
since your sizes are not too extreme, you could make ALL images 160x160, on a background that matches the background of the page. or even put the comments IN the images to fill the extra space. this way, you can specify 160x160 sizes for any and all images in your html.
8:47 pm on Mar 23, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 20, 2002
votes: 0

My suggestion would be to use something like Adobe Photoshop. First creat a custom action editing the size of the actual image. Then doing a save as it to another folder. That way you don't mess with the origanal image.

I do this all day long for a client now. They had some 5,000 garment photos that were on slides. I had to run them all through an auto slide scanner. Then created a custom action to resize and web ready them. Then I just ran a batch on them in Photoshop using the custom action. I did about twenty minutes worth of work and Photoshop did about two days worth of work (the great part about batching). At the end of two days I had the original 5,000 images that could be archived digitally and a duplicate image ready for the web.

If you need help with creating a custom action just drop me a line. I will be happy to help. They are easy to set up.