build sprite and fix main photo display bug