mutate.Time and mutate.Canonical accept tarball.LayerOption
When rebuilding an image and needing to preserve its layer compression or media type, pass the matching `tarball.LayerOption` values to `mutate.Time` or `mutate.Canonical`, then set the image and config media types with `mutate.MediaType` and `mutate.ConfigMediaType` as needed.
img, err := mutate.Time(img, t, tarball.WithCompression(compression.ZStd), tarball.WithMediaType(types.OCILayerZStd))
if err != nil { return err }
img = mutate.MediaType(img, types.OCIManifestSchema1)
img = mutate.ConfigMediaType(img, types. OCIConfigJSON)