My current image component maps through all the images in my folder and displays them, but I want to filter out two of my images so I can apply them to another page instead of displaying on the current page with all the other images in my folder.
How would I write my filter to remove the 2 images from showing up?
I have one image called background.jpg
and background-2.jpg
that I want to filter out
const data = useStaticQuery(graphql`
query {
allFile(filter: { extension: { regex: "/(jpg)|(png)|(jpeg)/" },
// So this line filters out background.jpg, but I can't seem to
filter out both background.jpg and background-2.jpg?
base: {ne: "background.jpg"}
}) {
edges {
node {
base
childImageSharp {
fluid(maxHeight: 600, maxWidth: 600) {
...GatsbyImageSharpFluid
}
}
}
}
}
}
`)