photo upload and thumb creation