Basic mem cachc for images