Skip to content

img src component prop is url encoded #1268

Discussion options

You must be logged in to vote

Welcome @piotrblasiak! 👋

Is this on purpose and if so, why?

It is on purpose, the src attribute is a URL (ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src), and URLs need to be URL encoded.
If you need to get the unsafe form of the URL, the decodeURIComponent function can be used.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants