we need to cache the thumbnail before we write it in case the writer needs to make several passes see https://github.com/jcupitt/libvips/issues/140
we need to cache the thumbnail before we write it in case the writer needs to make several passes see https://github.com/jcupitt/libvips/issues/140