'JPG Image Not Showing up in HTML

Everything else on my HTML page is showing up OK except my "cute_corgis.jpg" image. There's no "official" error, but only the image icon is showing up.

Here's my code:

<img src='cute_corgis.jpg' width='130' height='50' alt='Cute Corgis'>

The image is in the exact same folder as this HTML file, and the image name is correct. What's the problem?

P.S. I am using PythonAnywhere to run this webpage, if that's relevant.



Solution 1:[1]

See https://help.pythonanywhere.com/pages/StaticFiles/ for how to serve static files on PythonAnywhere

Solution 2:[2]

You'll need to use ./ as it doesn't know where to get the file from, ./ being the root directory the HTML is in.

<img src='./cute_corgis.jpg' width='130' height='50' alt='Cute Corgis'>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Glenn
Solution 2 IDeletedSystem64