This works awesome with the colored squares and is exactly what I am looking for except I am having trouble modifying it to work with photos.

Can someone please show me what I need to change or how to create the pix array for use with photos?