Putting a Photo Online

Is it possible to assign a link (url) to a photo in iPhoto?

iMac 27″, macOS 10.15

Posted on Jan 23, 2021 7:50 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 27, 2021 12:04 AM

Apple uses javascript to show the images in a shared album - in such a way that there is no direct link available for the image - so you can't use iCloud as the source for your webpage.


Regarding using full size/reduced size image. On a web page you always display a reduced size image - otherwise it would always be bigger than the screen. The only exception is if you have a dynamic page that allows you to zoom in and out of the image, or (eg) a gallery page that displays both a thumbnail, and the full sized image.


Normally the size is very much smaller - eg 2 to 4hundred pixels on a side. If you store the full size image on your webpage, your viewers browser will need to load the full size image, and then reduce it in size to put on the screen. This might not be too much of a problem for fibre broadband connections, but for somone on slower broadband, or mobile broadband in poorer coverage areas, it will make a significant difference to page load times, and might cause your viewer to go elsewhere. It is generally considered poor web design to do this.


For this reason you should always reduce the size of your images to match the size they will be displayed on screen.

17 replies
Question marked as Top-ranking reply

Jan 27, 2021 12:04 AM in response to ttibsen

Apple uses javascript to show the images in a shared album - in such a way that there is no direct link available for the image - so you can't use iCloud as the source for your webpage.


Regarding using full size/reduced size image. On a web page you always display a reduced size image - otherwise it would always be bigger than the screen. The only exception is if you have a dynamic page that allows you to zoom in and out of the image, or (eg) a gallery page that displays both a thumbnail, and the full sized image.


Normally the size is very much smaller - eg 2 to 4hundred pixels on a side. If you store the full size image on your webpage, your viewers browser will need to load the full size image, and then reduce it in size to put on the screen. This might not be too much of a problem for fibre broadband connections, but for somone on slower broadband, or mobile broadband in poorer coverage areas, it will make a significant difference to page load times, and might cause your viewer to go elsewhere. It is generally considered poor web design to do this.


For this reason you should always reduce the size of your images to match the size they will be displayed on screen.

Jan 26, 2021 7:13 PM in response to ttibsen

Mmm ... I steer clear of iCloud myself, so I'm no help there.

The iPhoto images are actually a library stored in the "Pictures" folder.

You'll likely find "Photos Library.photoslibrary" in "Pictures".

(If your system is different ... you could search for the folder in a Finder window)


Re: url of photo ... "Get info" also gives the location info (listed as "Where") of a photo.

(Most html editor programs (like "Sublime Text") will generate the url in html automatically on adding an image to web-page.)


To me, it seems difficult to find the photo you want in iPhoto Library folder, because of the way iPhoto stores them. Much easier to find the photo and export from iPhoto. (Personally, I mostly download photos to both iPhoto, and to my own set of folders.)


The way I understand it, browsers look for and open images in webpages from the folder (or system of folders) you set up for your website, and upload to the server.


All the best !









Jan 27, 2021 8:02 AM in response to TonyCollinet

Thanks to both of you for the responses. I am not very far along in my studies of .html but I should have made it clear that for my purposes at the moment, I am only looking to place small images as I practise my layouts. It appears that this will be impossible to do with url's linking back to images that I have on my iMac so I'll get the images from a site developed expressly for that purpose like Unsplash.

Jan 24, 2021 7:29 PM in response to ttibsen

Thank you! Grateful I could help.


By the way ... the image tag can also specify size info if you wish (... good for speedier viewing)

You can specify the actual size, or a carefully scaled-down size, to suit your page.


(You can find the actual size of an image by right-click on the image, and choose Get Info from the menu that opens ... the dimensions are there in the info. list).


for example <IMG SRC="yourimagename.jpg" WIDTH=180 HEIGHT=260>


Hope that's not too much info. ... in a few situations, the image may not show up in the browser, without adding the size info.

Cheers!


Jan 23, 2021 5:55 PM in response to TonyCollinet

<<(if you are looking for a link you can embed in a forum page or similar)>>

Not exactly sure what that means Tony but let me put my scheme another way. I want a link to my photo in iPhoto such that when I am taken to the page that the photo is on, I can then Control-Click on the photo such that this menu comes up -

I could then get an image address for the photo so that I could then reference that in my html code. So is that possible to do with the photos in iPhoto?

Jan 25, 2021 7:21 AM in response to brbo

<<You can find the actual size of an image by right-click on the image, and choose Get Info from the menu that opens ... the dimensions are there in the info. list>>

I tried this approach on the following website -

https://chile.travel/en/destionation-chile-an-eco-experience-with-native-flora

Right-clicking on the image of the purple flowers with the mountains in the background gives me this menu -

Nowhere do I see a Get Info option in this menu so just where is that image that you are right-clicking on? I don't think that you are referring to a website since your directions don't seem to apply there.

Jan 25, 2021 7:59 AM in response to ttibsen

I have done a bit more experimenting and now realize that what you meant by


<< You can find the actual size of an image by right-click on the image, and choose Get Info from the menu that opens ... the dimensions are there in the info. list >> 


applies not to an image on a web page but to an image that I have on my desktop.


I would like to continue to understand the following -


<< By the way ... the image tag can also specify size info if you wish (... good for speedier viewing) 


You can specify the actual size, or a carefully scaled-down size >>


Sticking with the example on this website with the image of the purple flowers,


https://chile.travel/en/destionation-chile-an-eco-experience-with-native-flora


This image, according to the Get Info page has dimensions of 1400 X 722 (is that in pixels?)


Now here is the tricky part … you say that I can specify my image requirements with the following code-


 <IMG SRC="yourimagename.jpg" WIDTH=180 HEIGHT=260>


If I need an 800 X 200 image for my web page I can’t just pop those values in for my purple flower image can I because the original has an aspect ratio of 1.94 / 1 and the 800 X 200 would have an aspect ratio of 4 / 1. So I couldn’t shrink down the original to fit into an 800 X 200 window without grossly distorting the image right? The size of the original image and the scaled down image is irrelevant but the important thing is that they both have to have the same aspect ratio. I guess the point is that you can’t put in any arbitrary values for the W and H  for your IMG SRC=“   “ code. You have to ensure that the aspect ratio is kept the same. What do you think?

Jan 25, 2021 4:04 PM in response to ttibsen

You are doing great in experimenting and coming up with solutions! (Sorry if my words were unclear.) Yes, it's the image stored on your computer that you can check with "Get info" as you discovered. (Yes, "Get info" uses pixels)


Re photo size : "You can specify the actual size (found in Get Info), or a carefully scaled-down size, to suit your page."


You are quite right about the aspect ratio!

For me, a quick way to keep the aspect ratio correct in specifying the size (e.g 1200 X 600) is just to

(1) divide width and height by the same number (eg. 2, 3, or 4), and deduct from the original size.


divide: 3 into 1200 = 400. and 3 into 600 = 200.

(2) Then deduct: 1200 - 400 = 800 and 600-200 = 400.

So 1200 X 600 has same aspect ratio as 800 X 400 (and also the 400 X 200)


(Of course, if you have image-manipulation software like Photoshop or GIMP, there's a wider choice in preparing images for web-pages: eg can use many tools like "crop" and "scale" etc.)

All the best!


Jan 26, 2021 6:16 PM in response to brbo

<< For me, a quick way to keep the aspect ratio correct in specifying the size (e.g 1200 X 600) is just to 

(1) divide width and height by the same number (eg. 2, 3, or 4), and deduct from the original size.

divide:                    3 into 1200 = 400.    and      3 into 600 = 200.  

(2) Then deduct:    1200 - 400 = 800       and      600-200 = 400.      

So 1200 X 600 has same aspect ratio as 800 X 400 (and also the 400 X 200)    >>


Simpler still - just divide both the W and H by the same # and that will maintain the aspect ratio as well without the additional bother of an extra math step.

Not to drive anyone crazy but I want to come back to the question of getting a valid url for any image that I have in iPhoto. You have made it clear that if the photo is in the same folder as the .html code then there's no need for a url. This line of code

<IMG SRC="imagename.jpg">

will do fine in that case. Is there a way though to get a url for an image that I have in iPhoto? Tony pointed that you can get a link to a folder of images but I need a link to a single photo in iPhoto. Is there a way to do that with iCloud?

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.

Putting a Photo Online

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