Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allImageSharp originalName regex not returning all images #20121

Closed
iamstevedavis opened this issue Dec 13, 2019 · 1 comment
Closed

allImageSharp originalName regex not returning all images #20121

iamstevedavis opened this issue Dec 13, 2019 · 1 comment

Comments

@iamstevedavis
Copy link

iamstevedavis commented Dec 13, 2019

Description

This is very similar to this issue here that was closed without resolution: #4843

I have a folder that has 4 images titled main_1.jpg, main_2.jpg, main_3.jpg and main_4.jpg. Using the following query, only three of the images are returned:

{
  allImageSharp(filter: {fluid: {originalName: {regex: "/^main.+/gm"}}}) {
    edges {
      node {
        id
        fluid {
          originalName
          originalImg
          src
          srcSet
        }
      }
    }
  }
}

Steps to reproduce

  1. Create a folder with 4 or more images
  2. Use the above query with a regex that will match all images in the folder
  3. Run the query against graphql

Expected result

All images return.

Actual result

Only a subset of the images are returned.

image

Environment

System:
OS: Linux 5.4 Manjaro Linux
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Shell: 5.0.11 - /bin/bash
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.19.1 - ~/.nvm/versions/node/v10.16.0/bin/yarn
npm: 6.12.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
Languages:
Python: 3.8.0 - /usr/bin/python
Browsers:
Firefox: 71.0

@LekoArts
Copy link
Contributor

Thank you for opening this!

You can leave out the gm options and see it working:

image

We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants