Jump to content

thumbnail images


scotto

Recommended Posts

I want to display thumbnails of photos in a web page, and these will be links to the full sized photos.I can create actual 100px-75px images to display as thumbnails in the links, or I can use the width and height attributes in my img tag, and just have a single image file on the server. For example:first method: <a href="myphoto.jpg"><img src="myphotothumbnail.jpg" /></a>second method: <a href="myphoto.jpg"><img src="myphoto.jpg" width="100" /></a>The former would only download a small fill, say 1 or 2k. But what about the latter approach? Does it download the full image, and then shrink it, or does that happen before the image is downloaded?Scott

Link to comment
Share on other sites

It would download the full image and then shrink the display of it. Depending on the size of your image files and how many you are displaying on the page at a time, it may take a lonnnnng time for the page to load for some users. However, all the images, once loaded, will be in the cache and the users wouldn't have to wait to load the individual, full-size images when they click on the links.

Link to comment
Share on other sites

Ok, that's what I figured. Thanks jesh.I'll continue the way I have been, using separate thumbnail images. The extra files don't take up too much space, but they make the page more friendly to those with slower connections.Thanks again,Scott

Link to comment
Share on other sites

This is a good idea in the short term, but like jesh says, the user will then have to wait if they click on it for the full size one, its your choice really, there isn't any way round making it quicker altogether, unless you have a thumbnail that you stretch, but that would look really "naff"

Link to comment
Share on other sites

Two additional points to make:a.) when/if ever deciding to use one image and then have the HTML dictate the size to display, keep in mind that only JPG images can be successfully reporportioned without loosing quality. GIF images do not retain enough color information so they end up looking pixelated when they are reproportioned as smaller images.b.) depending on the site and what you want to get out of it, using thumbnails and a good naming convention can help you in search engine rankings, especially in image searches.

Link to comment
Share on other sites

It's also about how much you resize it. If you resize it 2/3, or 50%, or 33%, or 25%, or 20% or some whole fraction, the math to resize it is easy to do and the image will still look decent. If you resize it 43% or 27.19283% or some odd fraction, you will get more artifacts then you would otherwise.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...