Static images do not appear if build is done without clear cache

I have a strange problem with Gatsby website deployed on netlify.
If i do a build with clear cache, all the downloaded assets from contentful are stored in public/static folder and servered from that folder, but when i do a build without clearing cache all the images are missing and i get this error: warning [gatsby-plugin-image] Missing image prop

in the logs clearly says that cache is retrieved and the build time is 2m ( with cleared cache is around 8-9min) and when i browse files, after a build is completed, the static folder with all the images are present , but not served.

Another thing is that local builds work without issue, no matter how many builds i do without clearing cache the images are served from public/static.

Website URL : https://686bde4bf7848a00084c7dd9--lips-healthcare.netlify.app/

(Cannot upload log, says new users cannot upload files…)

I am using gatsby-source-contentful plugin to download images locally and process them.
Querying images example:

      backgroundImageMobile {
        localFile {
          childImageSharp {
            gatsbyImageData(layout: CONSTRAINED, placeholder: BLURRED)
          }
        }
        gatsbyImageData(layout: CONSTRAINED, placeholder: BLURRED)
      }

Netlify automatically installs @netlify/gatsby-plugn and i have installed gatsby-plugin-netlify, but it seems they are not helping.

Any ideas what might be the issue ?

I’ve routed this ticket to our helpdesk, we’ll follow up via email.

1 Like