Git Product home page Git Product logo

Comments (7)

kylehotchkiss avatar kylehotchkiss commented on July 16, 2024 6

Protip if anybody else lands here, make sure your srcsets have commas :)

from lazysizes.

ClemensSchneider avatar ClemensSchneider commented on July 16, 2024

Well.... One second after filing the bug I realized that this seems to be an issue with chrome only.. The exception is not raised from lazysizes but from chrome.. So I guess you are not able to do something about it. :)

from lazysizes.

ClemensSchneider avatar ClemensSchneider commented on July 16, 2024

And I should URL-encode the URLs - so closing this issue...

from lazysizes.

vedam avatar vedam commented on July 16, 2024

Got the same error in console. Annoying.
What do you mean by "URL-encode the URLs" and how can I avoid chrome showing this for every image loaded?

from lazysizes.

aFarkas avatar aFarkas commented on July 16, 2024

You can fix this by not using white spaces in your URL. These characters are not allowed

from lazysizes.

vedam avatar vedam commented on July 16, 2024

hmmm. Yes. But I scripted my img-elements with:

    'data-bgset': `
      ${filename}-100.jpg 100w,
      ${filename}-500.jpg 500w,
      ${filename}-900.jpg 900w,
      ${filename}-1100.jpg 1100w,
      ${filename}-1300.jpg 1300w,
      ${filename}-2000.jpg 2000w
    `

so whitespaces are needed for the different sizes?

from lazysizes.

ClemensSchneider avatar ClemensSchneider commented on July 16, 2024

The output of ${filename} should not contain any whitespace. This is what aFarkas meant.

from lazysizes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.