What does “Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.” mean?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







14















I get Chrome errors on my website that say:




Failed parsing 'srcset' attribute value since its 'w' descriptor is
invalid.
Dropped srcset candidate
http://i2.wp.com/domain.net/wp-content/.../image.jpg?resize=425%2C200




Any idea what this means?



I am using WordPress as my website platform. I also use its Photon feature (within its Jetpack framework). My suspicion is that it has to do with this feature. Are image dimensions getting specified incorrectly or something?



What are 'w' descriptors?





UPDATE:
Here is the HTML:



<img src="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200" srcset="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200 w, http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=450%2C320 w" sizes="(min-width: 768px) 720px, (min-width: 992px) 700px, (min-width: 1200px) 850px, calc(100vw-20px)" alt="Change your thoughts and you change your world.">









share|improve this question

























  • It'll help to actually see the HTML source that Chrome is referring to (you may also get more information from the W3C validator).

    – Matt Gibson
    Jun 26 '15 at 13:24













  • Yeah, that might help. Added it.

    – Doug
    Jun 26 '15 at 13:30











  • The descriptor describes the physical width of the image candidate. It is a number followed by w. In your case the number is missing.

    – alexander farkas
    Jun 28 '15 at 8:33











  • @alexanderfarkas Is there a spec you can point me to that describes this in more detail? This is not an aspect of HTML that I am familiar with.

    – Doug
    Jun 28 '15 at 12:19






  • 1





    html.spec.whatwg.org/multipage/…

    – alexander farkas
    Jun 28 '15 at 12:22


















14















I get Chrome errors on my website that say:




Failed parsing 'srcset' attribute value since its 'w' descriptor is
invalid.
Dropped srcset candidate
http://i2.wp.com/domain.net/wp-content/.../image.jpg?resize=425%2C200




Any idea what this means?



I am using WordPress as my website platform. I also use its Photon feature (within its Jetpack framework). My suspicion is that it has to do with this feature. Are image dimensions getting specified incorrectly or something?



What are 'w' descriptors?





UPDATE:
Here is the HTML:



<img src="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200" srcset="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200 w, http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=450%2C320 w" sizes="(min-width: 768px) 720px, (min-width: 992px) 700px, (min-width: 1200px) 850px, calc(100vw-20px)" alt="Change your thoughts and you change your world.">









share|improve this question

























  • It'll help to actually see the HTML source that Chrome is referring to (you may also get more information from the W3C validator).

    – Matt Gibson
    Jun 26 '15 at 13:24













  • Yeah, that might help. Added it.

    – Doug
    Jun 26 '15 at 13:30











  • The descriptor describes the physical width of the image candidate. It is a number followed by w. In your case the number is missing.

    – alexander farkas
    Jun 28 '15 at 8:33











  • @alexanderfarkas Is there a spec you can point me to that describes this in more detail? This is not an aspect of HTML that I am familiar with.

    – Doug
    Jun 28 '15 at 12:19






  • 1





    html.spec.whatwg.org/multipage/…

    – alexander farkas
    Jun 28 '15 at 12:22














14












14








14


2






I get Chrome errors on my website that say:




Failed parsing 'srcset' attribute value since its 'w' descriptor is
invalid.
Dropped srcset candidate
http://i2.wp.com/domain.net/wp-content/.../image.jpg?resize=425%2C200




Any idea what this means?



I am using WordPress as my website platform. I also use its Photon feature (within its Jetpack framework). My suspicion is that it has to do with this feature. Are image dimensions getting specified incorrectly or something?



What are 'w' descriptors?





UPDATE:
Here is the HTML:



<img src="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200" srcset="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200 w, http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=450%2C320 w" sizes="(min-width: 768px) 720px, (min-width: 992px) 700px, (min-width: 1200px) 850px, calc(100vw-20px)" alt="Change your thoughts and you change your world.">









share|improve this question
















I get Chrome errors on my website that say:




Failed parsing 'srcset' attribute value since its 'w' descriptor is
invalid.
Dropped srcset candidate
http://i2.wp.com/domain.net/wp-content/.../image.jpg?resize=425%2C200




Any idea what this means?



I am using WordPress as my website platform. I also use its Photon feature (within its Jetpack framework). My suspicion is that it has to do with this feature. Are image dimensions getting specified incorrectly or something?



What are 'w' descriptors?





UPDATE:
Here is the HTML:



<img src="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200" srcset="http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=425%2C200 w, http://i1.wp.com/gaithersburgpsychologist.net/wp-content/uploads/2015/02/lightbulb.jpg?resize=450%2C320 w" sizes="(min-width: 768px) 720px, (min-width: 992px) 700px, (min-width: 1200px) 850px, calc(100vw-20px)" alt="Change your thoughts and you change your world.">






html wordpress






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 26 '16 at 10:05









Liam

16.5k1679132




16.5k1679132










asked Jun 26 '15 at 13:15









DougDoug

2,10792435




2,10792435













  • It'll help to actually see the HTML source that Chrome is referring to (you may also get more information from the W3C validator).

    – Matt Gibson
    Jun 26 '15 at 13:24













  • Yeah, that might help. Added it.

    – Doug
    Jun 26 '15 at 13:30











  • The descriptor describes the physical width of the image candidate. It is a number followed by w. In your case the number is missing.

    – alexander farkas
    Jun 28 '15 at 8:33











  • @alexanderfarkas Is there a spec you can point me to that describes this in more detail? This is not an aspect of HTML that I am familiar with.

    – Doug
    Jun 28 '15 at 12:19






  • 1





    html.spec.whatwg.org/multipage/…

    – alexander farkas
    Jun 28 '15 at 12:22



















  • It'll help to actually see the HTML source that Chrome is referring to (you may also get more information from the W3C validator).

    – Matt Gibson
    Jun 26 '15 at 13:24













  • Yeah, that might help. Added it.

    – Doug
    Jun 26 '15 at 13:30











  • The descriptor describes the physical width of the image candidate. It is a number followed by w. In your case the number is missing.

    – alexander farkas
    Jun 28 '15 at 8:33











  • @alexanderfarkas Is there a spec you can point me to that describes this in more detail? This is not an aspect of HTML that I am familiar with.

    – Doug
    Jun 28 '15 at 12:19






  • 1





    html.spec.whatwg.org/multipage/…

    – alexander farkas
    Jun 28 '15 at 12:22

















It'll help to actually see the HTML source that Chrome is referring to (you may also get more information from the W3C validator).

– Matt Gibson
Jun 26 '15 at 13:24







It'll help to actually see the HTML source that Chrome is referring to (you may also get more information from the W3C validator).

– Matt Gibson
Jun 26 '15 at 13:24















Yeah, that might help. Added it.

– Doug
Jun 26 '15 at 13:30





Yeah, that might help. Added it.

– Doug
Jun 26 '15 at 13:30













The descriptor describes the physical width of the image candidate. It is a number followed by w. In your case the number is missing.

– alexander farkas
Jun 28 '15 at 8:33





The descriptor describes the physical width of the image candidate. It is a number followed by w. In your case the number is missing.

– alexander farkas
Jun 28 '15 at 8:33













@alexanderfarkas Is there a spec you can point me to that describes this in more detail? This is not an aspect of HTML that I am familiar with.

– Doug
Jun 28 '15 at 12:19





@alexanderfarkas Is there a spec you can point me to that describes this in more detail? This is not an aspect of HTML that I am familiar with.

– Doug
Jun 28 '15 at 12:19




1




1





html.spec.whatwg.org/multipage/…

– alexander farkas
Jun 28 '15 at 12:22





html.spec.whatwg.org/multipage/…

– alexander farkas
Jun 28 '15 at 12:22












4 Answers
4






active

oldest

votes


















20














I had a similar error:




failed parsing srcset attribute value since it has an unknown descriptor




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






share|improve this answer



















  • 1





    yeah! For directories with spaces PHP can echo str_replace(' ', '%20',$url);

    – Fanky
    Feb 20 '18 at 16:55



















8














Your html is wrong.



This is a valid img tag with srcset:



<img src="phone.jpg" srcset="phone-small.jpg 256w, phone-big.jpg 512w" />


It says that if your browser understands srcset it should use the small image when the width is approx 256 px wide, and the bigger image when it is 512 px wide.



In your image tag you have nothing in front of the w:



srcset="http://...resize=425%2C200 w, ...



Notice there is nothing specifying the width? That's the problem.






share|improve this answer































    0














    In my case I was generating my srcset using a webpack loader called srcset-loader who was outputing a JSON object instead of a proper string.






    share|improve this answer































      0














      In my case, as with all cases above the image URL was corrupt:



      Example:



      https://aaaa.aaaa.com/?somequery


      Replacing /? with ? helped.






      share|improve this answer


























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31074180%2fwhat-does-failed-parsing-srcset-attribute-value-since-its-w-descriptor-is-i%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        20














        I had a similar error:




        failed parsing srcset attribute value since it has an unknown descriptor




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






        share|improve this answer



















        • 1





          yeah! For directories with spaces PHP can echo str_replace(' ', '%20',$url);

          – Fanky
          Feb 20 '18 at 16:55
















        20














        I had a similar error:




        failed parsing srcset attribute value since it has an unknown descriptor




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






        share|improve this answer



















        • 1





          yeah! For directories with spaces PHP can echo str_replace(' ', '%20',$url);

          – Fanky
          Feb 20 '18 at 16:55














        20












        20








        20







        I had a similar error:




        failed parsing srcset attribute value since it has an unknown descriptor




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






        share|improve this answer













        I had a similar error:




        failed parsing srcset attribute value since it has an unknown descriptor




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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 16 '16 at 17:34









        SandroMarquesSandroMarques

        1,9261825




        1,9261825








        • 1





          yeah! For directories with spaces PHP can echo str_replace(' ', '%20',$url);

          – Fanky
          Feb 20 '18 at 16:55














        • 1





          yeah! For directories with spaces PHP can echo str_replace(' ', '%20',$url);

          – Fanky
          Feb 20 '18 at 16:55








        1




        1





        yeah! For directories with spaces PHP can echo str_replace(' ', '%20',$url);

        – Fanky
        Feb 20 '18 at 16:55





        yeah! For directories with spaces PHP can echo str_replace(' ', '%20',$url);

        – Fanky
        Feb 20 '18 at 16:55













        8














        Your html is wrong.



        This is a valid img tag with srcset:



        <img src="phone.jpg" srcset="phone-small.jpg 256w, phone-big.jpg 512w" />


        It says that if your browser understands srcset it should use the small image when the width is approx 256 px wide, and the bigger image when it is 512 px wide.



        In your image tag you have nothing in front of the w:



        srcset="http://...resize=425%2C200 w, ...



        Notice there is nothing specifying the width? That's the problem.






        share|improve this answer




























          8














          Your html is wrong.



          This is a valid img tag with srcset:



          <img src="phone.jpg" srcset="phone-small.jpg 256w, phone-big.jpg 512w" />


          It says that if your browser understands srcset it should use the small image when the width is approx 256 px wide, and the bigger image when it is 512 px wide.



          In your image tag you have nothing in front of the w:



          srcset="http://...resize=425%2C200 w, ...



          Notice there is nothing specifying the width? That's the problem.






          share|improve this answer


























            8












            8








            8







            Your html is wrong.



            This is a valid img tag with srcset:



            <img src="phone.jpg" srcset="phone-small.jpg 256w, phone-big.jpg 512w" />


            It says that if your browser understands srcset it should use the small image when the width is approx 256 px wide, and the bigger image when it is 512 px wide.



            In your image tag you have nothing in front of the w:



            srcset="http://...resize=425%2C200 w, ...



            Notice there is nothing specifying the width? That's the problem.






            share|improve this answer













            Your html is wrong.



            This is a valid img tag with srcset:



            <img src="phone.jpg" srcset="phone-small.jpg 256w, phone-big.jpg 512w" />


            It says that if your browser understands srcset it should use the small image when the width is approx 256 px wide, and the bigger image when it is 512 px wide.



            In your image tag you have nothing in front of the w:



            srcset="http://...resize=425%2C200 w, ...



            Notice there is nothing specifying the width? That's the problem.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 26 '16 at 13:28









            oligofrenoligofren

            8,638956105




            8,638956105























                0














                In my case I was generating my srcset using a webpack loader called srcset-loader who was outputing a JSON object instead of a proper string.






                share|improve this answer




























                  0














                  In my case I was generating my srcset using a webpack loader called srcset-loader who was outputing a JSON object instead of a proper string.






                  share|improve this answer


























                    0












                    0








                    0







                    In my case I was generating my srcset using a webpack loader called srcset-loader who was outputing a JSON object instead of a proper string.






                    share|improve this answer













                    In my case I was generating my srcset using a webpack loader called srcset-loader who was outputing a JSON object instead of a proper string.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 5 '18 at 22:12









                    Guillaume Le MièreGuillaume Le Mière

                    2,12732244




                    2,12732244























                        0














                        In my case, as with all cases above the image URL was corrupt:



                        Example:



                        https://aaaa.aaaa.com/?somequery


                        Replacing /? with ? helped.






                        share|improve this answer






























                          0














                          In my case, as with all cases above the image URL was corrupt:



                          Example:



                          https://aaaa.aaaa.com/?somequery


                          Replacing /? with ? helped.






                          share|improve this answer




























                            0












                            0








                            0







                            In my case, as with all cases above the image URL was corrupt:



                            Example:



                            https://aaaa.aaaa.com/?somequery


                            Replacing /? with ? helped.






                            share|improve this answer















                            In my case, as with all cases above the image URL was corrupt:



                            Example:



                            https://aaaa.aaaa.com/?somequery


                            Replacing /? with ? helped.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Nov 25 '18 at 10:20









                            Zoe

                            14k85587




                            14k85587










                            answered Nov 25 '18 at 8:33









                            EliEli

                            195




                            195






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31074180%2fwhat-does-failed-parsing-srcset-attribute-value-since-its-w-descriptor-is-i%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                這個網誌中的熱門文章

                                Academy of Television Arts & Sciences

                                L'Équipe

                                1995 France bombings