I think the previous post might have hit the nail on the head. One noted urologist told me that too much or too little intercourse can be bad for the prostate. So abstinence can possibly lead to ED symptoms.
A picture can never sub for a real live girl. You'll probably find you have less of a problem when you are turned on by love instead of lust. I'm 75 years old and still enjoy it, but the problem is that old age robs rigidity and makes things difficult. I may have to restrict my activity to twice a week unless I function more like I did twenty years ago. I refuses to take viagra since I don't want to become dependent on it. I'm afraid that the day will come when I won't be able to perform at all, even though the intesity of pleasure is so much greater at my age. Your problem may be a real concern and you may need to see a doctor since there may be a good reason for a young man to have that problem.
I would seek professional help from a medical expert. If you have ever used plastic (bags, etc) as an auto-erotic 'toy'/accessory then you could have been exposed to dioxin/pthalytes, which can cause erectile dysfunction, so you will need to be forthcoming with your doctor, no matter how embarrassing. One homeopathic remedy that has worked for some people is Avena Sativa. It might be worth trying. And, by the way, there is no shame in being a virgin -- take your time. A lot of guys who lose it earlier don't know what to do with it anyway, so they may has well have waited!
masterbating to pornography can lower your erection when you have real sex, its a psycological thing, also if you stop masterbating for a week or two not even touch your self down there, you will see your penis will start becoming more 'active' on its own that I think is a build up thing .. IDK the science behind it but I do know it works..good luck man..
You may need to seek out a urologist to determine the extent of your erective dysfunction. A urologist can performed several tests: Doppler studies, rigiscan test, and other blood tests.