If you're restricted to using "mail", then you can use uuencode to encode the file. I think the modern mail clients still support uunecode :)
uuencode file.jpg file.jpg | mail -s "pic" "me@example.com"
File named is passed twice (first is the local file to be encoded and second is the file name as it will be extracted on the remote system).

Otherwise, you can use mutt or metamail to send MIME encoded mails. You can use both from command line.