I have opened a attachment photo on my Iphone, will it be safe?

I accidently opened a unknown email with a picture on it as a attachment on my iphone. Will my iphone be infected?/ spyware on it? Its not jailbroken.

Maybe.

No. Iphones don't get infected like that

Iphones get affected by spyware faster than a windows phone and slower than an android so its not a problem at all and androids get quickly affected by spywears.

You will be fine as long as you are using the mail app not the internet and are not jailbroken, and the photo is not a link (it will ask to open safari if so) allow is very safe and you will not get a virus as long as you are on the newes iOS sowftware.