Compression of image for both thumnil and emoji