Jump to content

Image Help


unbreakable9

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.