Final answer:
The HTML data attribute used in Lazysizes for defining an array of pixel sizes for responsive images is data-sizes. It enables automatic selection of image sources based on device and display characteristics.
Step-by-step explanation:
When using Lazysizes, a lightweight and highly performant lazy loader for images (including responsive images), the correct HTML data attribute to define an array of pixel sizes for responsive images is data-sizes. This allows the browser to select the most appropriate image source based on the current layout, size of the screen, and resolution. To use it, you specify auto in the data-sizes attribute and define your source set within the srcset attribute for img elements or within the data-srcset attribute for elements that are lazily loaded.