compress images
use cache to re-use images
Merge pull request #13 from lei-april/master

compress images and cache images in memory