You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The srcset attribute does not allow for the url to contain whitespace as it will interpet the whitespace as a seperator of condition descriptors srcset developer.mozilla.org
How would I go about URI encoding my srcset urls?
I am aware that I can modify the Img component from 'react-optimized-images' to URI-encode the srcsets urls before returning but the modification will get overriden upon updating the package.
I was hoping for a way to decode the image filename before processing so that i can pass src={require(encodeURIComponent(../w h i t e s p a c e.jpg))} to the Img component from 'react-optimized-image' which complains that w%20h%20i%20t%20e%20s%20p%20a%20c%20e%20.jpg does not exist ofcourse
The text was updated successfully, but these errors were encountered:
The srcset attribute does not allow for the url to contain whitespace as it will interpet the whitespace as a seperator of condition descriptors srcset developer.mozilla.org
How would I go about URI encoding my srcset urls?
I am aware that I can modify the Img component from 'react-optimized-images' to URI-encode the srcsets urls before returning but the modification will get overriden upon updating the package.
I was hoping for a way to decode the image filename before processing so that i can pass src={require(encodeURIComponent(../w h i t e s p a c e.jpg))} to the Img component from 'react-optimized-image' which complains that w%20h%20i%20t%20e%20s%20p%20a%20c%20e%20.jpg does not exist ofcourse
The text was updated successfully, but these errors were encountered: