Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant add Images In markdown #20

Closed
gramythedj opened this issue Jul 2, 2021 · 3 comments
Closed

Cant add Images In markdown #20

gramythedj opened this issue Jul 2, 2021 · 3 comments

Comments

@gramythedj
Copy link

gramythedj commented Jul 2, 2021

when i add images for example
"< img src="img_g irl.jpg" alt="Girl i" width="500" height="600" >"

then only alt tag is shown and not the image, it shown as null

The only working way to add an image is by URL

@httpsterio
Copy link
Owner

Hey, thanks for the issue. I'll try to verify the same issue on my end.

My gut instinct is that this is related to an issue I raised in the original repo I forked it from. Check this issue out and see if could be the same?

@httpsterio
Copy link
Owner

I cannot replicate the issue myself.

Are you sure you're linking to the images correctly? In my case, I'm throwing the images in the /static/img folder and in .eleventy.js config file on line 67 that gets passed through to /img when building it. This means that images for me are reachable in articles by refering them to as /img/image-name.png and in the final site they'll be available at https://httpster.io/img/image-name.png.

If you're not saving images to the /static/img folder, you might have to add a addPassThroughCopy and make note of where you're sending the images to.

https://httpster.io/article/2021-07-02-test-post/
Here's a demo post I made with some images. The markdown code for them are attached at the bottom so you can see how I formatted it.

If you give an image a title, it'll get wrapped in a <figure> and the title will be added as a caption to the image.

If you're using the markdown syntax ![alt text](url), the text you put in the brackets will become the alt text for that image. If you want to use lazy loading, you'll have to manually provide a data-src url on top of the regular src.

@httpsterio
Copy link
Owner

closing the issue as i cant replicate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants