When pondering such a question, I search for what I want with the addition of the term “AppleScript”, because AppleScript can do anything that a shell script can do, and restricts it to Mac solutions.
Searching for applescript to send a file by airdrop finds these articles that look promising:
FWIW, I had issues using found images until I realised that the image was being found during the Airdrop window animation, thereby returning a premature set of coordinates. A simple pause fixed that and it now works reliably.
This presumes that the image you're talking about is of the recipient's user icon. If you mean "how do I share via Airdrop at all?", then you can use an Apple Shortcut for that.