Handle images in cache correctly.