Well, assuming you are using SESSIONS to track which user is logged in, assuming your database has a unique index key to identify each user and assuming that key value is registered into your SESSION array...
Then, you could (when the picture is uploaded) either use that key value to prepend the file name with the key and an underscore, or if you're using a database to track the pictures, then add a foreign key field that you can insert the user's unique key into...
Examples:
original file name: something.jpg
new file name: 141_something.jpg (where 141 is the user's unique ID key)
OR
Original Image table Structure:
picture_id
picture
New Image table Structure:
picture_id
picture
user_id (where user_id would be the same field type as the user_id field in your user table)
Without knowing exactly how you are tracking things, I can't be more specific, so maybe consider posting some code and table structures...