Ask coding questions

← Back to all posts
Teams For Education - Images in Markdown
SamVan5

I'm experimenting with Teams for Education. As the documentation recommends, I'm writing my instructions in a README.md markdown file.

I'd like to add an image to my instructions. However, it seems that repl.it only supports a subset of markdown, where images are not allowed. Is this correct?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
MsPeck
SamVan5
Comments
hotnewtop
Coder100

So:

does not work?

oh hey, it does, on your top right ;)

SamVan5

@Coder100 Are you, by any chance, looking in repl.it Classrooms? I'm talking about the new Teams for Education, where you just have basic markdown files to work with.

![alt text](/image.png) doesn't seem to work.

Coder100
Coder100

hmm that's so weird, try this repl

apparantly relative paths don't work hm @SamVan5

SamVan5

@Coder100 alright, weird, are some domains blocked or allowed? images from my own domain don't seem to work here...

Coder100

ok, conclusion
relative URLs do not work (paths like ./image.png)
The reason for this is because I think repl.it renders them like HTML, so it tries to access it from repl.it's domain...

use absolute paths
something like paste.pics should be more than enough for this :)
@SamVan5

Coder100

just made a comment on it, does it make sense? @SamVan5

SamVan5

@Coder100 yeah, thx! All clear now :-) Just weird that images from my own website can't be used as an absolute url in repl.it, but from paste.pics are no problem :-S

SamVan5

@Coder100 Ok, I'm stupid... didn't check if I was using http or https...

Coder100

oh lol me too @SamVan5

SixBeeps

You can use images in MD files by using this syntax:

SamVan5

@SixBeeps I've tried that, but it shows just empty (not even the 'wrong image' icon). I've tried this with multiple images, tried to add them locally to the project, linking them with absolute and relative paths, ... nothing :-(

SamVan5

@SixBeeps nvm, didn't check if I was using https ...

wjhudson

@SamVan5 Did you ever get images working that are locally part of the repl? That's what I'm currently trying to do, with no success.

I have a file img.png in the root of my repl and in the README.md (also in the root dir) I have:
![image](./img.png "title")
and no success, it displays nothing.