Welcome Guest, Not a member yet? Register   Sign In
Best Practice for Images : Generating Thumbs or Resizing on the Fly
#3

[eluser]shoelessone[/eluser]
So I'm going to ask a question, but just so I understand the problem and learn something.

Why can't just show the thumbnail, and then if/when somebody clicks for the medium size image, you use JS to somehow display the medium image, and use the thumbnails name to come up with the medium image, and use CSS to scale the medium image?

I mean, you wouldn't even need ajax? right? I'm assuming you've got some naming convention (image_name_thumb.jpg and image_name_full.jpg or something) so you could just set the src of the medium image?

And you said CSS distorts the dimensions of the photo, but only if you specify a width AND height.. Could you get away with just containing the width (or height)? I mean, for a fixed width layout that might work, right?

So onclick of thumbnail, add whatever markup you need with JS, and set the source to the resized version of the full size jpg (whose name you get from the thumbnail image name, or by pre-populating it somehwhere on page load), then onclick again displays the image full size (it would have been cached at that point)?


Messages In This Thread
Best Practice for Images : Generating Thumbs or Resizing on the Fly - by El Forum - 04-30-2010, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB