async function resize(filename, width, format) {
  const out = sizedName(filename, width, format);
  if (await exists("_site" + out)) {
    return out;
  }
  await sharp("_site" + filename)
    .rotate() // Manifest rotation from metadata
    .resize(width)
    [format]({
      quality: quality[format] || quality.default,
      reductionEffort: 6,
    })
    .toFile("_site" + out);

  return out;
}
Generates sensible sizes for each image for use in a srcset.