Validating html, error with srcset missing "sizes" attribute

Hi,

When validating my html I get the following error.

Error: When the “srcset” attribute has any image candidate string with a width descriptor, the “sizes” attribute must also be present.

Is there a smart way to add the size attribute to images? Or is this an error I can ignore?

Adding the default value sizes="100vw" will get rid of the error.