No, the photo did not get you fired, your employer's questionable policies got you fired. If indeed a phallus joke between two persons in a private conversation is not objectionable, why was this person fired?
As I see it here, the more and more "transparent" our private lives become with cell phone cameras and always-on video glasses, the more protection employees need from bone-headed employers dismissing them for reasons wholly unrelated to their competencies performing the job they were hired to do.