cross-posted from: https://lemmy.blackeco.com/post/863915

The article mentions Next.js but it also applies to vanilla React as the sizes attribute is useful even outside Next’s <Image> component.