Giter VIP home page Giter VIP logo

Comments (9)

Frithir avatar Frithir commented on June 8, 2024 1

I hope to get time to look into this later. For now you can disable lazy images with lazy option/prop with the images component. See https://github.com/thriveweb/yellowcake/blob/master/src/components/Image.js

from yellowcake.

joebram avatar joebram commented on June 8, 2024 1

Thanks, so I changed the lazyload value to false and now the images don't load in desktop either, am I changing the right settings?

from yellowcake.

belamrani avatar belamrani commented on June 8, 2024 1

Hello @firthir . I have the same problem on a OnePlus 6. Have you found a better solution than disable the lazy loading ?

Thank you !

from yellowcake.

Frithir avatar Frithir commented on June 8, 2024

Thanks for the update. The intersection observer is not working. I don't have access to this device type for the test yet. Could you visit this Codepen and let me know if you're still having the issue.
https://codepen.io/afrith/pen/BaopQgY

from yellowcake.

joebram avatar joebram commented on June 8, 2024

Thanks, I get a rectangle saying 'observed' for each div. Screenshot attached.
Screenshot_20200423-065430

from yellowcake.

Frithir avatar Frithir commented on June 8, 2024

Cool, you found a bug. I've updated the repo and here is the code, or you can pull it in :).

    if (background && lazy) {
      style = {
        backgroundImage: `url(${
          this.state.isIntersecting ? fullSrc : smallSrc
        })`,
        backgroundSize
      }
    } else {
      style = {
        backgroundImage: `url(${fullSrc})`,
        backgroundSize
      }
    } 

https://github.com/thriveweb/yellowcake/blob/master/src/components/Image.js

Then add lazy={false} to the image you want.
Example use: https://github.com/thriveweb/yellowcake/blob/master/src/components/PageHeader.js.

if (large) className += ' PageHeader-large'
  return (
    <div className={`PageHeader relative ${className}`}>
      {backgroundImage && (
        <Image
          background
          resolutions="large"
          src={backgroundImage}
          alt={title}
          size="cover"
          lazy={false}
        />
      )}

from yellowcake.

joebram avatar joebram commented on June 8, 2024

Cool, glad it's been of some use! This might sound daft but I'd like to try and pull it in, bit of a novice with github, is it hard to do?

from yellowcake.

joebram avatar joebram commented on June 8, 2024

Hey, the images load in incognito using chrome but not in the normal browser page, have cleared the cache etc...

Also, on a different subject is there any documentation about adding another page using specific components?

Thanks,
Joe

from yellowcake.

Frithir avatar Frithir commented on June 8, 2024

Gatsby has an application cache. @joebram you can find this in chrome inspect element > Application tab at the top > Cache on the left-hand menu > cache storage.
Delete that and you should be sorted.

from yellowcake.

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.