The effects of climate change, urbanisation and agriculture are changing the way insects occupy habitats. Some species may utilise anthropogenic microhabitat features for their existence, either because they prefer them to natural features, or because of no choice. Other species are dependent on natural microhabitats. Identifying and analysing these insects' use of natural and anthropogenic microhabitats is important to assess their responses to a changing environment, for improving pollination and managing invasive pests. Traditional studies of insect microhabitat use can now be supplemented by machine learning-based insect image analysis. Typically, research has focused on automatic insect classification, but valuable data in image backgrounds has been ignored. In this research, we analysed the image backgrounds available on the ALA database to determine their microhabitats. We analysed the microhabitats of three insect species common across Australia: Drone flies, European honeybees and European wasps. Image backgrounds were classified as natural or anthropogenic microhabitats using computer vision and machine learning tools benchmarked against a manual classification algorithm. We found flies and honeybees in natural microhabitats, confirming their need for natural havens within cities. Wasps were commonly seen in anthropogenic microhabitats. Results show these insects are well adapted to survive in cities. Management of this invasive pest requires a thoughtful reduction of their access to human-provided resources. The assessment of insect image backgrounds is instructive to document the use of microhabitats by insects. The method offers insight that is increasingly vital for biodiversity management as urbanisation continues to encroach on natural ecosystems and we must consciously provide resources within built environments to maintain insect biodiversity and manage invasive pests.