Enlarge photo when clicking on it

Hi all,

How do I make a photo in my website open at a larger size when clicking on it? I'm hoping it is something easier than creating a new page for each enlarged photo that links from the smaller version.

Thanks,
Andrew

PowerMac G5 dual 1.8, Mac OS X (10.5.7), 3G of RAM; 1TB external drive; Final Cut Studio 2; MPEG Streamclip;

Posted on Dec 16, 2010 4:07 AM

Reply
10 replies

Dec 16, 2010 4:38 PM in response to Alancito

Thanks Alancito, one of those methods in the FancyZoom tutorial is what I am after, but I'm not very knowledgeable in this area so the things that it requires seem way beyond me. I don't know what or where my site folder is kept, and the idea of entering code is a bit baffling for me. I was hoping for a simple "cut and paste" option (e.g into the HTML Snippet box) that didn't require anything more.

Thanks for the help.

Andrew

Dec 16, 2010 4:43 PM in response to AndrewD

Then you might want to create a MobileMe Gallery thru iPhoto which can be updated frequently by adding and removing photos from it and then you can embed the gallery in a web page like on this demo page: MobileMe Galleries and Quicktime Movies. You can select any of the modes of the gallery to start with, grid, mosaic or carousal.

You wouldn't need iWeb to make the changes, just go thru iPhoto.

Dec 17, 2010 2:14 AM in response to AndrewD

AndrewD wrote:
I was hoping for a simple "cut and paste" option (e.g into the HTML Snippet box) that didn't require anything more.

Andrew ~ Here's some basic HTML (perhaps not up to current standards!) that could be pasted into the HTML Snippet box:

<a href="MYPICTURE" target="_blank"><img src="MYPICTURE" title=" Will open in new window " width="150"></a>

Here's an example with "MYPICTURE" replaced by the path to the image — click on the thumbnail:

User uploaded file

...That uses only the original image — so the thumbnail (produced by the width="150") will load the original (large) image even if it's not clicked.

To avoid that you could create a real thumbnail from the original image and use that as the second path in the HTML and remove the width="150". Then the original (large) image is only loaded if the small thumbnail is clicked.

User uploaded file

Dec 17, 2010 2:33 AM in response to Alancito

Thanks Alancito,

I'll show my complete iWeb ignorance here. The picture you've sent is exactly what I want to do. Just click on the small photo and it becomes large. But you lost me with the explanation under the picture. So can I ask a few questions?

1. In order for the code to work, do I need to resize my small photos so that they appear at 150 pixels?

2. I want people to have to click on the small photo to make it larger. The small photos are not a standard width and height at the moment. Do they need to be?

3. Do I have to paste the code in the HTML Snippet box just once? Or on every page on which there are photos I want to have this effect on?

4. I don't know where my site folder is, so I hope this is not necessary. In case it is important to know, I am going through another host, not MobileMe.

Thanks heaps,
Andrew

Dec 17, 2010 3:35 AM in response to AndrewD

AndrewD wrote:
1. In order for the code to work, do I need to resize my small photos so that they appear at 150 pixels?

Andrew ~ No. As I wrote: "That uses only the original image". The width="150" only shrinks the appearance of the large image, not its actual image or file size. ...If you don't mind large photos being loaded and appearing as thumbnails before they're clicked, you don't need small photos.
AndrewD wrote:
2. I want people to have to click on the small photo to make it larger. The small photos are not a standard width and height at the moment. Do they need to be?

No. Since you already have small versions of your photos, use the HTML I hinted at in the last paragraph of my previous reply:

<a href="MYPICTURE_LARGEVERSION" target="_blank"><img src="MYPICTURE_SMALLVERSION" title=" Will open in new window "></a>
AndrewD wrote:
3. Do I have to paste the code in the HTML Snippet box just once? Or on every page on which there are photos I want to have this effect on?

You have to paste the code into the HTML Snippet box for every photo.
AndrewD wrote:
4. I don't know where my site folder is, so I hope this is not necessary. In case it is important to know, I am going through another host, not MobileMe.

Presuming your site has been published, right click/control click an image on your site and choose "Open Image in New Tab". In the browser's address bar you'll see the image's path/URL that you would copy & paste over MYPICTURE in that HTML I gave. Click on the thumbnail in my previous post and look at the URL in the browser's address bar — that's what I copied & pasted over MYPICTURE in that HTML I gave to produce that clickable thumbnail.

In the end, you'll understand better by experimenting yourself. Or consider using an alternative to iWeb such as weebly.com. They offer a nice photo gallery set up via simple drag & drop, and their "square images" option displays all the photos square so they're always in a perfect grid. Click on the photos in this article:

_Weebly Photo Galleries_

User uploaded file

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Enlarge photo when clicking on it

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.