refactor image process
remove 'if not exist' in generated sql
add test for image process (unfinished)