It can be done via nice query. I'm not good query writer on a knee, but i'll try to give you a tip.
If we want 1 image and Data is a table, it is done like this:
GET ID, Data1, Image FROM Data JOIN Images WHERE Data1=Images.ID
For 3 images it is a bit more complex:
GET ID, Data1, Data2...