Update img and compress.