Comments (11)
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:
- If I didn't run
gatsby clean
but onlygatsby build && gatsby serve
the images show up (!). Could this be a cache problem? - 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.
@Haroenv The images don't show up on the local build and Netlfify build
from gatsby-plugin-algolia.
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.
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.
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.
from gatsby-plugin-algolia.
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.
@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.
@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.
@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.
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.
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)
- Question re: Algolia Search HOT 6
- Unreachable hosts Error HOT 6
- Algolia transformer returns nulls for images that are correctly displayed in built site HOT 1
- Support for Gatsby 5 HOT 2
- Gatsby 4 build broken gatsby-plugin-algolia v1.0.0 HOT 2
- failed to index to Algolia Cannot read properties of undefined (reading 'contentDigest') HOT 3
- Plugin breaking in Gatsby 5 HOT 5
- JavaScript heap out of memory HOT 5
- Add indexName to the gatsby cache key HOT 4
- Why partial partial update is no more optional ? HOT 6
- Enrich your records with Google Analytics data HOT 1
- Request for skipIndexing Option to Avoid Unwanted API Access During CI Builds HOT 2
- Extracting chunks of long text as its own record HOT 2
- Adding headers to graphql query HOT 3
- Error: cannot apply the batch operation on a replica index
- Plugin is deleting Sanity document from index if edited. HOT 3
- Adding new data to existing records is ignored HOT 3
- Gatsby internal.contentDigest is a poor source for deciding whether content needs to be updated HOT 6
- Do we still need the MatchFields and enablePartialUpdate options in config? HOT 2
- Partially update not updating existing object in index HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-plugin-algolia.