finish photo loading for javascript