Do not throw in Photos library to JPEGmini if you use iCloud photo library.
If you do that, JPEGmini will optimize photos in the library anyway, but Photos will not know the fact that photos were optimized by an external application. As a result you will face a huge duplication problem after a Time machine recovery or an OS X migration transfer, when Photos fails to match local photos (optimized) with remote photos (not optimized) on Apple’s server. Since Photos will recognize them as different sets of photos, you will have a doubled library with local photos being uploaded and remote photos being downloaded. To sort out the mess, you will have to manually select each duplicated photo in Photos app, which will be nearly impossible when you have tens of thosands photos. To avoid this unwanted situation with Photos optimized, you have either (1) not to use iCloud photo library at all; or (2) to import photos elsewhere before optimizing them and then to add to Photos library. And both respectively have issues. For the latter, you should turn off iCloud photo library on the iPhone and use a third-party utility to import photos from it. As El Capitan added extension APIs for Photos app, I wish JPEGmini would address this issue somehow in near future.
junghun yee about
JPEGmini