How to deal with an image?

I notice a model have some images.
I haven’t deal image now.
I deal the entities and the faces under the entities , and get entities and material from group and component_instance that under entities .
And repeat the process.
For each face, I detect the material .
And then I will use material if it exist.
So , I haven’t deal the image.
I think I can get the image from entities.
Now I don’t know how to get the image’s location.
Should I change image into entity?
Thank you.