Since most good pictures of insects require you to have your camera close, and flies have rather good vision, do you have any tips on taking good pictures of them?
Sneak up slowly and keep your shadow out of the way. Robber fly captured with smartphone for example.
I find them slower first thing in the morning.
All my photos are hand held iPhone.
Clip on lens can help me.
Patience and practice.
As others here have said, approach slowly, and if possible, photograph them in the morning. If mornings aren’t avalaible, overcast days are fine too. From my experience, robberflies tend to be more cooperative than other flies, though depending on where you live, they might not be present. As for photos, if you’re using a phone, you might want to buy a clip-on macro lens, to get the maximum quality. Most flies will fly away as soon as they see the camera, but some will allow decent photos. Mostly, it just requires a lot of practice, patience, and a little luck. Here are some photos I’ve taken of flies:
https://www.inaturalist.org/observations/283878068
This is a drain fly I observed recently in the shower. I didn’t have any problem with the fly flying away.
How do I post a picture in a thread?
I had quite a bit of luck during sunny days with a clip on macrolense.
My main tip would be taking photos of flies while they’re feeding/pollinating, as they are less likely to notice the camera if you approach carefully and will probably fly away to another flower nearby instead of vanishing into thin air. In my experience the most darty flies are big Syrphids/hoverflies, other big flies(in Calyptratae, for example) might stay even after they notice the camera lens, if you don’t make any sudden movements. Nematoceran flies are often nocturnal and don’t notice the camera when resting during daytime.
Small flies(2-5 mm) can be hard and I don’t really have a strategy for them, unfortunaly.
To add a picture, press onto the landscape icon, which will let you choose photos directly your stored photos on your device.
(sorry for the bad example photo)
If your phone (or camera) has 4k video, try using this on flighty, smaller flies.
Prefocus manual seems to work best, focus on something about the same size as your fly, that won’t move, and lock the focus when you feel it will fit into the frame enough.
Don’t get too optimistic and over tighten the composition. Then start the recording and move as smoothly and steadily as you can. Chances are, if you get in a good focal range and move in and out a bit, you’ll get something useful in all those frames.
If it remains after you approach, unlock focus and play around a little. It’s a crapshoot, for sure, but it’s gotten me more shots than single frame shooting. Or even multi-frame stills. Uses more battery and mem card space, but often worth a try.
Some cameras will even let you shoot video at high shutter speeds in manual mode. It’s a great way to generate tons of shots very quickly and easily.
The more you practice, the luckier you’ll get.
I don’t photograph many flies, but I have a lot of practice photographing odonates with my iphone, and I assume these techniques could be applied to flies as well. Sneak up on the target by walking very slowly, no sudden movements, make sure your shadow doesn’t cover the target as mentioned above. When you get close, if you have trouble getting a good focus, try moving the phone slightly backward and forward with focus locked until the target comes into sharp focus. My best odonate shots happen when I get close enough for macro mode to kick in, and I manually turn macro mode off (it only works well for extreme closeups) and use the above focusing technique. If the target flushes and re-perches, try again, for many odonates anyway (especially gomphids) it will let you approach a bit closer each time (idk if flies would be the same)
The photo is on iNat. What is the markup code to show it?
To add a photo, the only way I know, is to download your image (directly from the observation on INat), by pressing the “i” icon. It will then send you to a page that lets you just hold onto the photo, and it will give you the option to download. Then you can follow the instructions in my other comment to add it to a post. Sorry if I didn’t write these well. :)
You can also go to your observation, copy the URL from the address bar and post it in your forum comment. People can follow the link to see everything about it.
The general syntax is:

So your example would be:

If the image is too large, it can be resized using an alternative syntax:
<img alt="drain fly" width="200" src="https://inaturalist-open-data.s3.amazonaws.com/photos/510110567/medium.jpg">
Ah! The bang goes before the brackets, not in them.
If you are using a phone camera ( I use iPhone)
Learn Two Handed Photography! It seems you need 3, hold, focus and shutter! Remember on iPhone the lower volume button is a shutter release.
Practice!