"Autism was more common in children who had had an otitis media infection or who had been treated with antibiotics."
Minus any sweeping generalisations, that was the conclusion reached in the study by Theresa Wimberley and colleagues  continuing some important research themes (see here and see here) examining any "interplay among otitis media, antibiotics, and the subsequent risk of developing autism."
Just in case you don't already know, otitis media infection refers to an infection of the middle ear that "causes inflammation (redness and swelling) and a build-up of fluid behind the eardrum." Aside from the use of painkillers, the seriousness of certain otitis media infections can sometimes mean that antibiotics are prescribed to combat any underlying bacterial infection or even in some cases, grommets inserted as treatment.
Wimberley et al report results based on "the entire Danish population", well, over three-quarters of a million children "followed from birth (January 1, 1997 to December 31, 2008) until December 31, 2012." They calculated various 'risk of autism' statistics as a function of a previous medical diagnosis of otitis media and "antibiotic prescriptions redeemed at Danish pharmacies." Yes folks, yet again those big data Scandinavian population registries have been used to good research effect.
Results: "The absolute risk of autism before age 10 was increased among children with otitis media (1.2% for females and 3.3% for males) and in children who had redeemed an antibiotic prescription (0.6% and 2.7% for females and males) compared to children without a history of otitis media and antibiotics usage (0.4% for females and 1.9% for males)." Researchers also reported finding "little evidence of a synergistic effect between otitis media infections and treatment with antibiotics" despite them being over-represented in relation to autism. They also caution that cause-and-effect cannot be inferred from their observational results.
What more can one say about the Wimberley findings? Well, echoing the idea that correlation is not the same thing as causation, I'd say that there is quite a bit more research to do on this topic. Further investigations are required into the possible mechanisms through which autism may manifest at least partially as a result of a history of ear infection (or indeed vice-versa). Mention of antibiotics also brings in areas of additional research interest such as the gut microbiome and what antimicrobials might 'be doing' to the trillions of passengers that are carried in the deepest, darkest recesses of the human body. I'm also minded to suggest that alongside antibiotic use to potentially treat infections like otitis media, researchers might also want to focus in on other medicines that might be accessed in such case such as over-the-counter pain relief in light of other *associations* that have been made (see here).
 Wimberley T. et al. Otitis media, antibiotics, and risk of autism spectrum disorder. Autism Res. 2018 Oct 3.