question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images are broken in build version and console has errors like 'Missing resources for /'

See original GitHub issue

On http://localhost:8000/ everything works properly but after deploy build version all images just displays with blur effect and blur doesn’t disappear at all blur

Also console has these errors(‘Missing resources’): errors

Environment (if relevant)

System: OS: macOS 10.14.4 CPU: (8) x64 Intel® Core™ i7-7700HQ CPU @ 2.80GHz Shell: 3.2.57 - /bin/bash Binaries: Node: 8.12.0 - /usr/local/bin/node Yarn: 1.13.0 - /usr/local/bin/yarn npm: 6.9.0 - /usr/local/bin/npm Languages: Python: 2.7.10 - /usr/bin/python Browsers: Chrome: 75.0.3770.100 Safari: 12.1 npmPackages: gatsby: ^2.9.9 => 2.9.11 gatsby-background-image: ^0.7.2 => 0.7.2 gatsby-image: ^2.1.4 => 2.1.4 gatsby-plugin-compile-es6-packages: ^1.1.0 => 1.1.0 gatsby-plugin-manifest: ^2.1.1 => 2.1.1 gatsby-plugin-offline: ^2.1.3 => 2.1.3 gatsby-plugin-prefetch-google-fonts: ^1.4.2 => 1.4.2 gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12 gatsby-plugin-sass: ^2.0.11 => 2.0.11 gatsby-plugin-sharp: ^2.1.5 => 2.1.5 gatsby-plugin-typography: ^2.2.13 => 2.2.13 gatsby-remark-images: ^3.0.16 => 3.0.16 gatsby-remark-relative-images: ^0.2.2 => 0.2.2 gatsby-source-filesystem: ^2.0.39 => 2.0.39 gatsby-transformer-json: ^2.1.11 => 2.1.11 gatsby-transformer-remark: ^2.4.0 => 2.4.0 gatsby-transformer-sharp: ^2.1.21 => 2.1.21 npmGlobalPackages: gatsby-cli: 2.6.5

File contents (if changed)

gatsby-config.js:

plugins: [
   `gatsby-plugin-react-helmet`,
   {
     resolve: "gatsby-source-filesystem",
     options: {
       path: `${__dirname}/src/images`,
       name: "images",
     },
   },
   `gatsby-transformer-sharp`,
   `gatsby-plugin-sharp`,
   {
     resolve: `gatsby-source-filesystem`,
     options: {
       path: `${__dirname}/content`,
       name: `markdown`,
     },
   },
   {
     resolve: `gatsby-transformer-remark`,
     options: {
       plugins: [
         {
           resolve: "gatsby-remark-relative-images",
         },
         {
           resolve: `gatsby-remark-images`,
           options: {
             maxWidth: 590,
           },
         },
       ],
     },
   },

   `gatsby-plugin-sass`,
   `gatsby-transformer-json`,
   {
     resolve: `gatsby-plugin-typography`,
     options: {
       pathToConfigModule: `${__dirname}/src/utils/typography`,
     },
   },
   {
     resolve: `gatsby-plugin-compile-es6-packages`,
     options: {
       modules: [`gatsby-background-image`],
     },
   },

package.json:

{
  "dependencies": {
    "babel-eslint": "^8.2.6",
    "eslint-config-prettier": "^5.0.0",
    "eslint-plugin-graphql": "^3.0.3",
    "gatsby": "^2.9.9",
    "gatsby-background-image": "^0.7.2",
    "gatsby-image": "^2.1.4",
    "gatsby-plugin-compile-es6-packages": "^1.1.0",
    "gatsby-plugin-manifest": "^2.1.1",
    "gatsby-plugin-offline": "^2.1.3",
    "gatsby-plugin-prefetch-google-fonts": "^1.4.2",
    "gatsby-plugin-react-helmet": "^3.0.12",
    "gatsby-plugin-sass": "^2.0.11",
    "gatsby-plugin-sharp": "^2.1.5",
    "gatsby-plugin-typography": "^2.2.13",
    "gatsby-remark-images": "^3.0.16",
    "gatsby-remark-relative-images": "^0.2.2",
    "gatsby-source-filesystem": "^2.0.39",
    "gatsby-transformer-json": "^2.1.11",
    "gatsby-transformer-remark": "^2.4.0",
    "gatsby-transformer-sharp": "^2.1.21",
    "intersection-observer": "^0.7.0",
    "node-sass": "^4.12.0",
    "prop-types": "^15.7.2",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-helmet": "^5.2.1",
    "react-typography": "^0.16.19",
    "typography": "^0.16.19"
  },
  "devDependencies": {
    "eslint": "^5.16.0",
    "eslint-plugin-prettier": "^3.1.0",
    "eslint-plugin-react": "^7.13.0",
    "prettier": "^1.18.2"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write src/**/*.{js,jsx}",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\""
  },
  
}

gatsby-node.js: N/A gatsby-browser.js: N/A gatsby-ssr.js: N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:10

github_iconTop GitHub Comments

4reactions
MaximeHeckelcommented, Sep 30, 2019

I updated gatsby-plugin-sharp to ^2.2.10 and it fixed the issue I had with Netlify not loading my “gatsby-images” for my project. Let me know if this helps

1reaction
jschlechtecommented, Jul 12, 2019

@juddey – Thanks for the tip! Rolling back to 2.8.8 also resolved this issue for me. I was seeing it on Amazon S3 for every single page prior to the rollback!

I hope this gets a fix soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle loading of images that may not exist?
If an image does not exist, we can replace it with a new one. Another way to handle this issue is by listening...
Read more >
React won't load local images - Stack Overflow
The public folder is useful as a workaround for a number of less common cases: You need a file with a specific name...
Read more >
Pasting a dataUrl base64 encoded image in the editor fails ...
A broken image placeholder is displayed. The following error is thrown in the editor and the image is lost. com.atlassian.confluence.content.render.xhtml.
Read more >
How to Fix Broken Image Links - OpenAsset
Broken image links are bad for your brand and your business. This guide will show you how to find and fix broken image...
Read more >
How To Fix "Failed To Load Resource" Error In WordPress
This file can be anything like an image, other media, JavaScript, or a CSS stylesheet. A missing resource can cause your website to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found