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.

How to disable the lazy loading from images in md files ?

See original GitHub issue

I’m looking for a way to cancel the lazy loading feature from the images, something to convert this

![](/./image..jpg) in md files into this

<g-image src="./image.png" immediate='true' />

can anyone help?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SteveEdsoncommented, Jun 10, 2019

Would this need to be done per image? Or could it just me a setting defined once in the gridsome/plugin config?

1reaction
dominiquedutracommented, Jun 7, 2019

@mbeayou it seems that currently, this is not possible.

Images in Markdown are transformed on gridsome/transformer-remark/lib/plugins/image.js. An image in MD files is limited. You can only specify the path and the alt/title. The main problem I see is you can not specify custom properties for images on markdown language.

If you could do this (totally hipotetic):

![immediate=true, alt=Nice alt tag](/./image..jpg) 

We could modify image.js to take this parameter and pass it along with the transformation. Or we could have a parameter to make all images immediate, but I don’t see why you would do that.

This seems to me as a Markdown limitation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

graphql - scaling and lazy loading images in markdown html
I'm trying to get the images to scale up and lazy load like you can do using the Gatsby Image API . The...
Read more >
[Gatsby] How to lazyload images in markdown | by Kohei Arai
I took inspiration from [gatsby-images] [gatsby-remark-images] ... If everything is working fine, this should enable lazyloading of images!
Read more >
Lazy Loading your images in Jekyll blog Improving page speed
1. Introduction to the problem: Defer off-screen images · 2. Using Lazysizes · 3. Get the Lazysizes min file. · 4. Giving a...
Read more >
Media | reveal.js
To enable lazy loading all you need to do is change your src attributes to data-src as shown below. This is supported for...
Read more >
Lazy loading images - web.dev
To polyfill lazy loading of <img> elements, we use JavaScript to check if they're in the viewport. If they are, their src (and...
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