gatsby: Inline images in Markdown not being transformed by gatsby-remark-images
Description
I’m trying to use gatsby-remark-images to optimize images in my blog posts, but when I view my blog post, it appears to just load the large image. There is no blur-up effect happening.
Steps to reproduce
Here’s the repo where I can’t make this work.
- Place a high-res image in
/static/assets - Add an entry in
gatsby-config.jssogatsby-source-filesystemcan process those images
{
resolve: `gatsby-source-filesystem`,
options: {
name: `static/assets`,
path: `${__dirname}/static/assets`,
},
},
- Add
gatsby-remark-imagesto thegatsby-transformer-remarkconfiguration
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 813,
},
},
{
resolve: `gatsby-remark-prismjs`,
options: {
noInlineHighlight: true,
},
},
],
},
},
- Add a reference to my high-res image in a blog post

Expected result
When I view my blog post, the blur-up effect should occur before my high-res image is displayed.
Actual result
There is no blur-up effect. The page appears to load the high-res image the same as it would without the plugin.
Environment
System:
OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.12.3 - /usr/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
Languages:
Python: 2.7.17 - /usr/bin/python
Browsers:
Chrome: 70.0.3538.77
Firefox: 71.0
npmPackages:
gatsby: ^2.18.12 => 2.18.12
gatsby-background-image: ^0.9.12 => 0.9.12
gatsby-image: ^2.2.34 => 2.2.34
gatsby-plugin-linaria: ^2.0.0 => 2.0.0
gatsby-plugin-manifest: ^2.2.31 => 2.2.31
gatsby-plugin-netlify-cms: ^4.1.33 => 4.1.33
gatsby-plugin-offline: ^3.0.27 => 3.0.27
gatsby-plugin-react-helmet-async: ^1.0.13 => 1.0.13
gatsby-plugin-sharp: ^2.3.5 => 2.3.5
gatsby-plugin-typescript: ^2.1.23 => 2.1.23
gatsby-remark-images: ^3.1.39 => 3.1.39
gatsby-remark-prismjs: ^3.3.28 => 3.3.28
gatsby-source-filesystem: ^2.1.40 => 2.1.40
gatsby-transformer-remark: ^2.6.45 => 2.6.45
gatsby-transformer-sharp: ^2.3.7 => 2.3.7
npmGlobalPackages:
gatsby-cli: 2.7.7
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (8 by maintainers)
@ttstauss I came across these issues as well while working on a recent Gatsby TypeScript project. I fixed the issue by using the gatsby-plugin-netlify-cms-paths plugin. Now, I don’t need to add
../to the image URLs to get them to work, and the images show now up automatically.My
gatsby-config.jsMy NetlifyCMS admin content folders in
static/admin/config.ymlHope this helps!
https://saxyfool.dev/blog/blur-it-up
@tmrp your suggestion worked perfectly. Thanks for the help! 👏
@reinierkors for @sslotsky’s case the effect was kicking in, what was happening was in his content there was a good ammount of text and the image was not in the viewport so the effect would kick in but we couldn’t see it. I tested it with a dummy document and it was blurring up. And glad that you found it. Should you need any help, feel free to comment here so that we can go over it.