scotto Posted September 20, 2006 Share Posted September 20, 2006 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 More sharing options...
jesh Posted September 20, 2006 Share Posted September 20, 2006 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 More sharing options...
scotto Posted September 20, 2006 Author Share Posted September 20, 2006 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 More sharing options...
holmedwa04 Posted September 24, 2006 Share Posted September 24, 2006 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 More sharing options...
Skemcin Posted September 25, 2006 Share Posted September 25, 2006 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 More sharing options...
holmedwa04 Posted September 25, 2006 Share Posted September 25, 2006 Oh, so that is why when I resized one of my pics using the wodth and height attributes it made it look all pizelated, I thought that resizing it smaller wouldn't but it did. I ended up just editing the picture in my editor. Link to comment Share on other sites More sharing options...
real_illusions Posted September 25, 2006 Share Posted September 25, 2006 if you resize the jpg images proportinally..then the pixelenated thingymigig wont happen.say reduce it from 600x600 to 100x100, would give a clear picture, but a 79x51 thumbnail would look a bit horrible Link to comment Share on other sites More sharing options...
holmedwa04 Posted September 25, 2006 Share Posted September 25, 2006 Yeah, I thought that to, I thought if you enlarged then it would loose quality, but if you decreased it would not, it was because I was trying to use a gif and not a jpeg. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 25, 2006 Share Posted September 25, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now