Is wearing a face mask to prevent the transmission of an airborne virus as ineffective as building a chain-link fence to keep mosquitos out of a yard? No, that's not true: This is a misleading analogy, but it was made as a joke. The gaping diamond-shaped holes in chain-link fencing cannot block minuscule mosquitos. Meanwhile, various academic, scientific and medical journals like the Proceedings of the National Academy of Sciences of the United States of America (PNAS) have published research proving that wearing a face mask does slow the spread of airborne viruses.
The claim appeared as a June 2, 2020, Facebook post (archived here). The comic-like image in the post displays a woman wearing a mask standing on one side of a chain-link fence. On the opposite side is a man not wearing a mask. The text reads:
[woman]: I'm wearing this mask to keep this virus out of my body.
[man]: I'm building this fence to keep the mosquitos out of my yard.
This is what the Facebook post looked like on August 18, 2021:
(Source: Facebook screenshot taken on Wed Aug 18 20:16:40 2021 UTC)
The Centers for Disease Control and Prevention has an advisory and additional information on wearing face masks to prevent the spread of viruses like COVID-19.