Inline images in Markdown not being transformed by gatsby-remark-images
See original GitHub issueDescription
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.js
sogatsby-source-filesystem
can process those images
{
resolve: `gatsby-source-filesystem`,
options: {
name: `static/assets`,
path: `${__dirname}/static/assets`,
},
},
- Add
gatsby-remark-images
to thegatsby-transformer-remark
configuration
{
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
![](/assets/construction.jpg)
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Working with Images in Markdown & MDX - Gatsby
Inline images with gatsby-remark-images ... One way to do this is to grab the image filename from a frontmatter field and then transform...
Read more >Gatsby Remark Images not working for inline images
Came across this issue today with gatsby v4. My problem was that the gatsby-remark-images do not make any changes to some image files....
Read more >Gatsby.JS: Working with Images in Markdown Posts and Pages
One way to do this is to grab the image filename from a frontmatter field and then transform it with gatsby-plugin-sharp in a...
Read more >gatsby-remark-images | Yarn - Package Manager
Processes images in markdown so they can be used in the production build. In the processing, it makes images responsive by: Adding an...
Read more >qupaya meets Gatsby!
Inline images. Since we want standard Markdown, gatsby-transformer-remark is used in conjunction with gatsby-remark-images to process images ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.js
My NetlifyCMS admin content folders in
static/admin/config.yml
Hope this helps!
https://saxyfool.dev/blog/blur-it-up