Basically each product image gets an ID and stored in tb_image table.
The images are stored in "img/p" folder under folder(s) matching the ID.
So image with ID 254 will be stored under "img/p/2/5/4/" with all images matching types (home, medium, small, .......)
The file names will start with the ID number: "254-home_default".
Also the original uploaded file size will be stored there "254.jpg".
btw: this is not the original uploaded file, but a generated version (which cause some quality reduction)