Preload responsive images in header

I would like to preload responsive images in the header.

Is there a simple way to access the different urls for srcst in ‘$image->srcset()’ without the markup ?

<link rel="preload" as="image" href="<?= $image->url() ?>" imagesrcset=" " imagesizes=" ">

What do you mean by that?

@texnixe I’ve juste found out that the solution is simpler than what i’ve thought.
‘imagesrcset=" <?= $image->srcset() ?>"’