unbreakable9 Posted January 30, 2009 Share Posted January 30, 2009 Hey guys, im sorry if this is an easy question for you guys but its not something i know the answer to obviously. Anyways, i was curious if it was at all possible to make it so when an image was posted on a site, that the thumbnail itself would still be able to be right clicked and you could then "save image as" and save the original image full size and all. However, when clicked on the image it would open a page in php that would allow you to view the image you clicked but also make it so you can click previous or next if there are multiple images in the set. For example i upload a bunch of pictures to a site that are thumbnails and people want to right click it and save the image to view it later they can. but they could also click on the image and a page will open allowing them to then view the images in a gallery. Quote Link to comment Share on other sites More sharing options...
.josh Posted January 31, 2009 Share Posted January 31, 2009 To make it a link, you would wrap anchor tags around it, just like with anything else. In order to allow thumbnails to right click > save as full sized image, you can't use thumbnail file sized images. You would have to use the full sized image and make it a thumbnail size with the img width and height attributes. Example: You have a 200x300 image named somepic.jpg, but want to show a 20x30 thumbnail: <a href='targetpage.php'><img src='somepic.jpg' width='20' height='30' /></a> Yes, this does cause the full picture to be downloaded in the first place. There's a small possibility you can accomplish what you want with ajax. That is, having a thumbnail filesized image display, but when you right click > save, it makes a request to the server for the full sized image, but I'm not sure that javascript has that much control over the browser. Maybe some javascript guru can settle that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.