limited access to files
I'm building a website which will have huge collection of certain pictures

. Only registered users will be able to load that pictures in their browser via php script. The main problem is that I need to prevent users from accessin those images by typing something like this:
www.mysite.com/images/image1.jpg into their browser.
Can I do this with htaccess somehow, maybe enable only my php scripts to have access to that folders?