Skip to content

Images not displaying #322

Open
Open
@RosieBraunholtz

Description

I can't seem to get local images to display. Images from a website are fine, but when they come from the local folder, nothing comes up.

Here is my folder layout:

  • _posts
    - post1.html
  • img
    - img1.jpg`

in post1.html I've put the line: <img src='/img/img1.jpg'>.
This is what I've researched to be correct, but I have also tried <img src='img/img1.jpg'> and <img src='../img/img1.jpg'> and neither of them work either. I have tried putting the image inside the _posts folder to see if that helps, but nothing.

However when I link from a website the image works fine, for example : <img src='https://www.nasa.gov/sites/default/files/thumbnails/image/stsci-01gfnr1kzzp67ffgv8y26kr0vw.png'> shows up with the correct image.

Not sure why it's not working and it's very frustating. I've double checked the spelling and file path a million times. Any help?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions