fix init bug
compress to jpg