sei-ec-remote / project-2-issues

1 stars 0 forks source link

Can't get local images to display #274

Closed rectorjordan94 closed 1 year ago

rectorjordan94 commented 1 year ago

What's the problem you're trying to solve?

Cannot get image file to render on page.

Post any code you think might be relevant (one fenced block per file)

<div class="col-md-4" style="padding-left: 12">
            <img src="/images/architect.jpg" alt="architect card" width="238" height="350" >
        </div>

If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?

I'm getting back a 302 status code for my image file location.

What is your best guess as to the source of the problem?

I'm not sure to be honest. The file path seems to be correct, yet it's still not rendering. And I've tried every configuration of the path I can think of. I'm not sure if its related to using liquid to display the page content and using a relative path in the image source, but that's my best guess.

What things have you already tried to solve the problem?

I have tried changing the image source multiple times to: 'images/architect.jpg', '/images/architect.jpg', './images/architect.jpg', '../images/architect.jpg' as well as using a url to the file online. Using the online url works fine but I want to try to have the images locally so that I don't have to worry about it losing the images in the future.

Paste a link to your repository here

https://github.com/rectorjordan94/everdell-wiki

timmshinbone commented 1 year ago

Images will need to be placed in the public folder, try putting the images directory into the public directory and see if the behavior changes.

rectorjordan94 commented 1 year ago

That worked, thank you!