Lens flare, one of the most common problems encountered by iPhone photographers, will be fixed automatically in iOS 15, it's been discovered.

In the fourth beta version of the upcoming iOS 15 software update, a new camera function automatically removes lens flare in image post-processing. The discovery was reported by 9to5Mac after several beta-testing iPhone users wrote about it on Reddit.

One user points out that the feature does not appear to be applied consistently, at least in its current form (which may alter before the public version of iOS 15.0 launches in the autumn). Lens flare on a sky or grass background is edited out, the user reports, but when it's on a more complex background such as tree foliage, iOS leaves it alone.

Another Redditor speculates that the feature tends not to trigger when images are taken indoors, when the software might reasonably assume it's seeing light fixtures rather than lens flare.

Camera app developer Halide has also discussed the feature - which wasn't disclosed during iOS 15's unveiling at WWDC this June - on Twitter. The images show that a green spot that appeared on the lens when the backlight image was taken has been removed by the software.

Reddit users confirmed that the feature works on iPhone XS and later. Whether earlier phones than this can also use the function is unclear, but several iOS 15 functions only work on iPhone models with A12 Bionic or later processor chips.

This article originally appeared on Macworld Sweden. Translation and additional reporting by David Price.