Encoding on encoded url for image
See original GitHub issueBug Description
Image url is getting encoded without checking whether the url is already encoded while adding image url in the element.
Note: This may not be a bug for wordpress case
Expected Behaviour
Would be good if we check the url before encoding.
Steps to Reproduce
Used storybook
- Use firebase storage image url
- Add image url in
getDummyMedia
list - Go to stories editor and add image from media section to the story card.
For more details please see below video
Sample :
createDummyImageData({
mimeType: 'image/jpeg',
src: 'https://firebasestorage.googleapis.com/v0/b/c-dashboard-d4a82.appspot.com/o/media%2FNurUn5ekSeOkSCfk1yPIkg17buI3%2Fimages%2F1650068451121-omid-armin-nACf6L_pXq8-unsplash.jpeg?alt=media&token=edc4dfd7-6ac1-44a0-83b7-1aa99a3adad3',
width: 5262,
height: 7981,
id: 1,
title: 'dummy image',
})
Actual image url :
https://firebasestorage.googleapis.com/v0/b/c-dashboard-d4a82.appspot.com/o/media%2FNurUn5ekSeOkSCfk1yPIkg17buI3%2Fimages%2F1650068451121-omid-armin-nACf6L_pXq8-unsplash.jpeg?alt=media&token=edc4dfd7-6ac1-44a0-83b7-1aa99a3adad3
Encoded srcSet url :
https://firebasestorage.googleapis.com/v0/b/c-dashboard-d4a82.appspot.com/o/media%252FNurUn5ekSeOkSCfk1yPIkg17buI3%252Fimages%252F1650068451121-omid-armin-nACf6L_pXq8-unsplash.jpeg?alt=media&token=edc4dfd7-6ac1-44a0-83b7-1aa99a3adad3 412w
Screenshots
Video
Additional Context
- Branch : main branch
- WordPress Version: Not applicable
- Operating System: mac
- Browser: chrome
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Base64 Image Encoder - Convert any image file or URL online
With Base64 Image Encoder, you can convert any image file or URL to either Base64, HTML, CSS, JSON, or XML online. Everything happens...
Read more >Base64 Image Encoder
Optimize your images and convert them to base64 online. Drag & Drop your files, copy to clipboard with a click and use the...
Read more >Convert image to url encoded base64 - ChemInfo.org
Convert image to url encoded base64. This view allows to quickly generate an URL encoded image. While it may be intersting to insert...
Read more >How to convert image to Base64 online - Base64.Guru
1. Choose the source of image from the “Datatype” field. 2. Paste the URL or select an image from your computer. 3. If...
Read more >Data URLs - HTTP - MDN Web Docs - Mozilla
Encoding in JavaScript. The Web APIs have native methods to encode or decode to base64: Base64 encoding and decoding. Encoding on a Unix...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting!
Sounds like we ought to be able to make this more robust.
For context, this was introduced in #9452
Sorry for late response @swissspidy https://github.com/GoogleForCreators/web-stories-wp/pull/11731 its working thank you 💯