gatsby: gatsby-remark-images does not remove background image

Description

I assume that this is the same as #20408 - which still exists.

This is a screenshot image with a transparent background… no - it should not be gray but white.

It seems that this issue is caused because onRouteUpdate is not called from inside the plugin. A workaround is to re-export onRouteUpdate in your own gatsby-browser.js

exports.onRouteUpdate = require("gatsby-remark-images/gatsby-browser").onRouteUpdate;

Steps to reproduce

https://github.com/CodeAndWeb/gatsby-bug-remark-images

Expected result

Images should be cleaned up after loading.

Actual result

Image have a blurry background.

Environment

System: OS: macOS 11.2.3 CPU: (16) x64 Intel® Core™ i9-9900K CPU @ 3.60GHz Shell: 5.8 - /bin/zsh Binaries: Node: 12.21.0 - ~/.nvm/versions/node/v12.21.0/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.11 - ~/.nvm/versions/node/v12.21.0/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 89.0.4389.90 Firefox: 87.0 Safari: 14.0.3 npmPackages: gatsby: ^3.0.1 => 3.0.1 gatsby-plugin-mdx: ^2.1.0 => 2.1.0 gatsby-plugin-sharp: ^3.1.2 => 3.1.2 gatsby-remark-autolink-headers: ^3.1.0 => 3.1.0 gatsby-remark-images: ^4.1.1 => 4.1.1 gatsby-source-filesystem: ^3.1.0 => 3.1.0

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 18

Most upvoted comments

Still issue m

Seeing the same behavior here.

No - this is not stale.