There are about a thousand posts about this online already (I found it on Lifehacker), but I wanted to save this command for my own use in the future.
I take dance videos. After each concert, I back up at least 3 cards, sometimes up to 9. For good hygiene, I always format my cards before use. Every time I insert a card, the Photos app launches prompting me to import pictures. Since I format every time, Clicking on the “don’t import photos” option doesn’t make any difference (it must store a file on the SD card).
So, I ran this command, and Photos stays closed, as I want it to. I’ll just launch Photos when I want to import photos.
$ defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
Dear Apple- if you’re reading this, I appreciate that you gave me the “Open Photos for this device” option, and I can see that this helps many people. But, there are many people like me who would like a global option in the Photos preferences: “Open Photos for all devices” which, when unchecked, would leave Photos sleeping until I want to wake it.