createImageResizer = async (config) => {
  const useNative = config?.extractor?.useNative || []

  const resizer = [
    { active: useNative.includes('vipsthumbnail'), factory: getVipsResize, name: 'vipthumbnail' },
    { active: useNative.includes('convert'), factory: getConvertResize,    name: 'convert' },
    { active: true, factory: getSharpResize,   name: 'sharp' },
    { active: true, factory: getVipsResize,    name: 'vipthumbnail fallback' },
    { active: true, factory: getConvertResize, name: 'convert fallback' },
  ].filter(item => item.active)

  const factoryOptions = {
    quality: +(config?.extrator?.image?.previewQuality || 80)
  }

  let index = 0
  const next = async () => {
    if (index == resizer.length) {
      log.error(`Could not load an image resizer`)
      return errorResizer
    }
    const item = resizer[index++]
    return item.factory(factoryOptions)
      .then(imageResizer => {
        log.info(`Use ${item.name} to resize images`)
        return imageResizer
      })
      .catch(err => {
        log.warn(err, `Could not load ${item.name} image resizer`)
        return next()
      })
  }

  return next()
}
@param {object} config
@returns {Promise<ImageResizer>}