Failed parsing 'srcset' attribute value since it has an unknown descriptor. #9535
Closed
1 task done
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: assets
Related to the Assets feature (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome (haven't tested others)
Describe the Bug
When an image path name has a space in it,
srcset
doesn't work properly in chrome.For example, when doing the following:
I get the following output in the console in chrome after the build (this prevents the correct behaviour).
We can see this is because the space hasn't been correctly parsed into
%20
in the HTMLimg
element:What's the expected result?
The build step should replace the srcset path spaces with
%20
like so:This produces no errors and it works properly now in Google Chrome.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-mdbw9p?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: