Storing libraries on cloud services such as Dropbox or iCloud Drive
It is common for Mac users to want to store their photo libraries in a folder managed by a cloud syncing services, such as Dropbox, Box, or Google Drive (just to name a few). Theoretically, having your library stored here would allow you to access your whole photo collection from multiple Macs and keep them easily synced. Unfortunately, the Photos library format is not designed with this in mind, and storing your library in one of these services can result in corruption of your library. This is not due to any fault of the cloud services provider: the library format simply doesn’t mesh well with the per-file syncing engine used by these services. It is highly recommended that you do not store your library in one of the folders managed by a cloud syncing service.
Apple’s own iCloud Drive feature (not to be confused with the iCloud Photos feature of the Photos app) has similar issues to the ones experienced with third party cloud syncing services. Photos will allow you to create a library in iCloud Drive, but you will see a small￼ icon next to the library in the Finder, indicating that the item is “ineligible” for iCloud Drive syncing. Your library will remain there and function fine, but its contents will not sync to iCloud at all, and you will not see it appear on other Macs you use with iCloud Drive.
Simply put, if you wish to sync your photo collection across multiple Macs, iCloud Photos is the best solution available.