With the attached photo, is this just lens flare?
It's a fingerprint on the lens, illuminated by pointing the camera towards the Sun.
Compare with this photo where the photographer says his photo is ruined with a similar flaring that was caused by a fingerprint: https://www.flickr.com/photos/21936705@N00/8462523655/ .
See this DigitalPhotoSecrets.com article on lens cleaning where that photo is referenced.
My first impression was that I've seen similar effects on the inside of my glasses at times. It happens when the sun is reflecting off my skin then onto my glasses. But for that to happen in a camera would be...difficult. You couldn't get the light to show on the inside of the glass under normal circumstances.
Without more details on the situation (camera, lens, how much the photo was cropped) it is hard to be sure here but the fingerprint theory has merit. It doesn't have to be an actual fingerprint, but something on the lens. Maybe from resting it against your arm, or your jeans something like that.
Prevention of that would be three fold:
- Use a lens hood. Not only does it prevent the sun from hitting the gunk on the lens (and causing that effect) (from some angles), it also helps keep you from accidentally touching the lens.
- Build good habits to prevent you from touching your lens. Many things from how you carry the camera to how often you put on the lens cap can have a big effect on keeping that lens clean.
- And most obviously, Clean the lens! It's always a pain, but I find that keeping a couple micro-fiber cloths that are a absorbent (not all micro-fiber is the same) means I can take more frequent pauses and check to clean the front element.
Anything (fingerprint, oil smudge, etc.) on the front of a lens can certainly acerbate flare. But the example in the question looks like run of the mill veiling flare coupled with the multi-prismatic effect from diffraction grating due to the microlenses in the surface of a digital imaging sensor to me.
This example posted on this "Show me your worst lens!" Fred Miranda thread certainly is not shaped like a fingerprint or any other type of smudge on the front of the lens. It's just poor/nonexistent lens coatings. Most lenses created for use with digital cameras won't have such well defined shapes where the veiling flare is integrated with the shaped flare. But the lens used to create this image was an old Yashica ML 50/1.9 from the film era.