My iCloud Photo Library is 16GB. Because the drive in my Mac is only 128GB I don't want all my photos to be stored locally on my Mac but rather just load the photos when I open the Photos app.
Any idea how to do this?
If you don't want any of your iCloud pictures on your computer.
Go to System Preferences > iCloud and turn off iCloud Photo Library. If you click on the Options button in the category, you can turn off single parts of iCloud and keep others on.
Photo has it on > You deselect it obviously
Also see Apple's support article on how to Get help with your iCloud Photo Library
You have two general options for your situation.
The less drastic (and easier) option is to enable Optimize Mac Storage, under Photos > Preferences > iCloud tab. This will cause your computer to remove original-size photos and only store thumbnails when you are running low on space. The originals will continue to be stored in iCloud.
The other option is to not make any changes to your iCloud Photo Library settings and move your Photos library to an external hard drive. This would require a bit of effort, and the hard drive will need to be plugged in when you want to use Photos.
To move the photos library to an external hard drive:
In Finder, click on the Pictures folder in the sidebar. Inside this folder should be an item named
Photos Library.photoslibrary. Hold the Command key and drag this to your external hard drive. It may take some time for it to move.
Launch Photos while holding the Option key. This will cause a popup to appear that asks you to locate your library.
If the library from the external hard drive doesn't appear on the list, click on Other Library and navigate to your external drive, then open the Photos Library.photoslibrary library that you copied earlier.
At this stage you will probably get a prompt starting with "This library contains items that need to download from iCloud Photo Library." Click on the Delete Incomplete Items button.
Once Photos opens, go to Photos > Preferences > General tab and click on Use as System Photo Library. You will get a prompt about it turning off iCloud Photo Library. That's fine. Click OK.
Go to the iCloud tab in Preferences and turn iCloud Photo Library back on. It will act like it needs to upload files, and may take some time, but it shouldn't actually need to upload much since it's all already in iCloud.