Closed michael-mashush closed 8 months ago
source/index.html <source srcset="./assets/images/banners/home/banner_100x.webp 1x, ./assets/images/banners/home/banner_200x.webp 2x" /> build/index.html <source srcset="./assets/images/banners/home/banner_100x.webp, ./assets/images/banners/home/banner_200x.webp 2x" /> why is "1x" removed from "srcset" attribute?
<source srcset="./assets/images/banners/home/banner_100x.webp 1x, ./assets/images/banners/home/banner_200x.webp 2x" />
<source srcset="./assets/images/banners/home/banner_100x.webp, ./assets/images/banners/home/banner_200x.webp 2x" />
UPD: if you use the src attribute on the source tag, everything will work correctly, but inside the picture tag, you must use the srcset attribute
src
source
picture
srcset
UPD 2.0: Turns out the x1 flag is optional
x1
source/index.html
<source srcset="./assets/images/banners/home/banner_100x.webp 1x, ./assets/images/banners/home/banner_200x.webp 2x" />
build/index.html<source srcset="./assets/images/banners/home/banner_100x.webp, ./assets/images/banners/home/banner_200x.webp 2x" />
why is "1x" removed from "srcset" attribute?