Prior to the Oscar Wilde trial in Britain and the invention in the public mind of the homosexual stereotype, it was very common for men in public to embrace, and to walk arm in arm with each other in Britain. It still is common in some European countries. It was not out of the ordinary for two men to be seen in public walking hand in hand, to embrace each other or to be photographed iwth your chum showing affection in pre-Oscar Wilde images and society. Suddenly with the Wilde trial everything change almost over nigiht as there was now a figure, an image of what a homosexual looked like, how they acted and what they did.
During the French Second Empire (1852-1870) when homosexuality was legal (under the Code Napoleon of 1806) there is the beginning of the glimmer of a) the understanding of the causes of homosexual sex acts (believed to be due to malformed genitals) and b) the "homosexual material culture" but it is very vague but references are made to flamboyant clothing, affected speach (camp voice, mannerisms, a lisp was apparently popular). Even in France where homosexuality was legal, one had to be very discrete about it.
Speaking as a Historian who is studying social history of the mid-Victorian period to PhD it is quite dangerous to suggest what we are seeing in posed, formal Cartes de Visites or Albumen Prints as "homosexual" when displaying affection towards other men was very differant from the later Victorian period.
If one looks at early 19th century plates (i.e.commercial pritns), even of military subjects, it is quite common to see men arm in arm or holding hands or embracing because that was the accepted social norm. Even in the more prudish United States. I could post some British or French prints of officers embracing and one could say that was decpiting "homosexual" acts, when in fact that print is a commercial print sold because of the interest in military subjects and it shows the social norms of the day in terms of male affection.
Even in a situation where you have same sex dancers (Cowboy Dance image) that is not neccessarily homosexual (i.e.those are not gay men as we would understand it) because of the all male environment. It is enforced homosexualitty (and I do not mean that in termsof active actual sex acts) because there are no women to dance with. It's that simple. It is not a photograph of "gay" cowboys.
This notion of enforced homosexuality (again I am NOT referring to sex acts , but simply male: male emotional attachment) due to lack of availability of women is quite prevelant in the armed forces. In most 19th century armies soldiers did not have their own bed they often shared with one or two other men. That doesn't make them gay it just means that they have strong male bonds. There has been a recent excellent study done on the French Napoleonic armies and male friendship of this type. The soldiers were close and there was obviously an air of homoeroticism but they were not homosexuals.
Similarly, I have come accross two instances during the Crimean War 1853-1856) of cross-dressing at a ball. In both cases they were by very young officers who did it "as a laugh" however,one of the officers involved from the 63rd Regiment was "notorious" for it and also apparently very good at it / hard to tell from a woman so much so that he was regularly asked to dress as a woman for Theatricals etc. However it does ask the question whether the chap in question was a transvestite or someone we would now understand as a drag queen or a "lady boy". He was so good as a female impersonator, however, he did have "his hand squeezed" by one officer and they went off together.
We cannot read modern homosexual mores into the part nor can we interpret the past using modern toolsor ideas such as the modern idea of homosexual and in fact what these images probably represent is simply male affection rather than homosexual attraction. Also it would be very dangerous to be photographed with your "boyfriend" by a photographer in a public studio in countries where homosexuality was illegal, let alone display the photograph. Cartes de Visites were used as "calling cards" one gave to friends or to business acquiantances or as a means of introduction; they were mass produced, very public and were basically used as business cards. Whilst someone who was homosexual might use his Carte de Visite to display his sexuality and availabiliy for sex (rather like gaydar or similar) that would be very unusual and also highly dangerous activity.
So what Im trying to say is: the 19th century photographs show nothing out of the ordinary in terms of male: male affection and it is dangerous supposition to suggest that we are seeing images of "gay" people.