When you plug in your iPhone, iPad, or just about any SD card with a photo on it, Photos loves to pop open. We’ve shown you how to turn this off on a device-by-device basis, but if you’d prefer a more all-in approach, then a Terminal command is your best option.
All you’ll need to do is pop into Terminal (Applications > Utilities) and type in this command:
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
With that, Photos will no longer open up on its own regardless of what device you plug in.
Stop Photos from opening automatically [Defaults-Write]