Updated to include pngs as well as jpegs.