The srcset is broken when on a locale that formats numbers differently.
The "1.5x" is generated using the current locale instead of ensuring that it is in a format that the browser understands.
On a locale that uses the decimal comma, that results in a broken image for unzoomed view, since the browser doesnt get image1 1.5x, image2 2x
, but image1 1,5x, image2 2x
, which means the three "images" image1 1
, 5x
, and image2
.
I think you shouldn't rely on the locale to format numbers that have to follow source code syntax.