Giter VIP home page Giter VIP logo

Comments (11)

danoszz avatar danoszz commented on May 23, 2024 1

hmm, can you check if the image plugin is before, or after the algolia plugin in the configuration? I think if the algolia plugin is listed first, the images aren't yet created, and thus old urls might be indexed.

The Algolia plugin was before the image plugins. Just moved it as last and tested with gatsby clean && gatsby build && gatsby serve. Did not work, although I found something interesting:

  1. If I didn't run gatsby clean but only gatsby build && gatsby serve the images show up (!). Could this be a cache problem?
  2. This could be a nice workaround, but in production, it is desirable to build once and deploy since NetlifyCMS pushes changes to production automatically.

If the Algolia plugin is already last, it might be related to how the urls are created (maybe async, and later in the life cycle than onPostBuild?).

I am not really sure since I don't know a lot about this. I'll research this.

Can you create a simple reproduction with just a few images? No need to put Algolia credentials, I can test with my own :)

On it! Will post the link ASAP.

from gatsby-plugin-algolia.

danoszz avatar danoszz commented on May 23, 2024 1

@Haroenv The images don't show up on the local build and Netlfify build

from gatsby-plugin-algolia.

danoszz avatar danoszz commented on May 23, 2024 1

Thank you for testing it @Haroenv this means my machine is having a rough week, not gatsby-plugin-algolia. Do the images show up when you run gatsby serve too,?

I've taken some time to clean up the repo and the minimal reproduction works right now too locally and live. So, it's the production build which isn't running. Brings me a step closer.

My assumption, for now, is that I have some unwiped traces of an integrating Netlify Large Media, which, unfortunately isn't supported. I will keep this thread alive for now to post my findings and possible solution if someone ever runs into this specific problem!

from gatsby-plugin-algolia.

danoszz avatar danoszz commented on May 23, 2024 1

So I will close this topic down. It seems that the culprit is something with sharp and Node versions. Not sure what yet, but definitely not this plugin.

Thank you again for your help. 👨‍💻

from gatsby-plugin-algolia.

danoszz avatar danoszz commented on May 23, 2024

Update

Since this is a breaking bug for a week now in our release to live, I'll keep logging personal finds and updates regarding the issue. Maybe the rubber-repo-duck-method helps us 💁‍♂️

After replacing the links in Algolia manually, the image works! This means that the problem is definitely in between the generated thumbnails by gatsby-image and the sync to Algolia.

algolia-load-bug_exampleworking

from gatsby-plugin-algolia.

Haroenv avatar Haroenv commented on May 23, 2024

hmm, can you check if the image plugin is before, or after the algolia plugin in the configuration? I think if the algolia plugin is listed first, the images aren't yet created, and thus old urls might be indexed.

If the Algolia plugin is already last, it might be related to how the urls are created (maybe async, and later in the life cycle than onPostBuild?).

Can you create a simple reproduction with just a few images? No need to put Algolia credentials, I can test with my own :)

from gatsby-plugin-algolia.

danoszz avatar danoszz commented on May 23, 2024

@Haroenv it took me a -long- while, but this is the most minimal I could get without breaking stuff and losing concepts.

🔗 Repo with minimal reproduction

from gatsby-plugin-algolia.

Haroenv avatar Haroenv commented on May 23, 2024

@danozz when I try building this (yarn build), I get the same id in Algolia as in my public folder. Is this not what you're getting?

from gatsby-plugin-algolia.

danoszz avatar danoszz commented on May 23, 2024

@danozz when I try building this (yarn build), I get the same id in Algolia as in my public folder. Is this not what you're getting?

It also compiles without errors here, but the problem occurs when I run gatsby serve or deploy to Netlify. What kind of id do you mean? The objectID?

from gatsby-plugin-algolia.

Haroenv avatar Haroenv commented on May 23, 2024

I meant the image id seems to be the same as in the public folder. I'm surprised that the id changes again once you serve, it doesn't for me. Do you run the build on netlify or on your machine?

from gatsby-plugin-algolia.

Haroenv avatar Haroenv commented on May 23, 2024

That's a good sign. Maybe it's worth changing the name of all your images to make sure no old cache can be used? I don't think you can globally clean Netlify's cache

from gatsby-plugin-algolia.

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.