The Humble img Element and Core Web Vitals
Would be nice to be able to declare<p>&quot;Use this size image when the img is being rendered at x size&#x2F;width&#x2F;height&quot;, size could depend on css, width&#x2F;height properties, or just imposed by a parent element.<p>Choosing an image size based on the size of the entire screen is a hack that we&#x27;ve just accepted because we don&#x27;t have a more precise tool.<p>Yes, you can technically achieve it with JS, but that&#x27;s a crutch, and less helpful for page load.