Failed parsing 'srcset' attribute value since it has an unknown descriptor.


Error :

Failed parsing 'srcset' attribute value since it has an unknown descriptor.

dropped srcset candidate "<url>"

srcset spaces



My Code :



<picture>



   <source media="(max-width: 768px)" srcset="https://locahost/wp-content/uploads/2019/01/image banner.png">



   <img class="js-lazy-image" src="https://locahost/wp-content/uploads/2019/01/image banner1.png"       style="width:100%;height:100%">



</picture>



when i am using the above code in my HTML page, I got those above Chrome errors on my website:



A simple 10 min research, I found the below solution.



and the problem was caused by a space in the image path URL.



Solution :



<picture>



   <source media="(max-width: 768px)" srcset="https://locahost/wp-content/uploads/2019/01/image-banner.png">



   <img class="js-lazy-image" src="https://locahost/wp-content/uploads/2019/01/image-banner1.png"       style="width:100%;height:100%">



</picture>





Note : The above solution is worked for me

Comments

Popular posts from this blog

Why Mark Zuckerberg’s Choose 4

Error message when I run sudo: unable to resolve host (none)

Convert MBR to GPT