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.

Hey, if I refer an image ![](./photo.jpg) from markdown and add the image into the folder, jdown tries to parse the image (I think). It would be good to exclude extensions or to only include .md. Also it would be great to find a solution to include those images into the public dist folder of react-static, but I 'm not sure this is the right place to discuss about this.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

DanWebbcommented, Jun 12, 2018

Hey @bkniffler I’ve been working on this feature, you can see progress so far in the images branch of this repo

I’ve still got some test cases to write/run but it’s nearly there. It’d be a massive help if you could have a quick review and let me know your thoughts and if it looks like it suits what you were looking for.

Essentially, images/ sub-directories can be added in any of the contents folders (take a look at /example/content) then the images can be referenced from the md files using ./images/image.png. It’s possible to set an output directory as well as a base path and some minification in the options like:

jdown('example/content', {
  asset: {
    output: './your/static/file/directory',
    path: '/public' // images src will end up as path + imagename.ext
    png: {quality: '65-80'} // passed to imagemin

The image files get run through imagemin and have an mtime (last modified time) timestamp appended to their file names for cache busting.

It’s currently possible to place an images folder in the top contents directory and then reference the images from that folder in subfolder md files like:

- images/
  | - image.png
- collections/
  | - blog/
  |   | - <-- can use ./images/image.png

This wasn’t intended but I don’t mind it, as some people might just want a single image folder. However, I think if an images folder was placed inside collections/blog folder that contained a file called image.png it should overwrite it.

This is backwards compatible so the images directories and asset options are completely optional.

DanWebbcommented, Jun 23, 2018

I’m going to close this issue as the latest version of jdown 0.6.4 contains the feature 🚀

Check the assets section of the readme for more details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Images
Google Images. The most comprehensive image search on the web.
Read more >
Images - Google
Send feedback. AllImages · Sign in. Videos. Double-tap to search Google. REPORT THIS. CANCEL. OK. DELETE. Settings · Search settings · Advanced search....
Read more >
Unsplash: Beautiful Free Images & Pictures
Beautiful, free images and photos that you can download and use for any project. Better than any royalty free or stock photos.
Read more >
Image - Wikipedia
An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey ......
Read more >
2.7 million+ Stunning Free Images to Use Anywhere - Pixabay ...
Find your perfect free image or video to download and use for anything. ✓ Free for commercial use ✓ No attribution required ✓...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found