Image not appearing. Instead it is displaying the alt text

46 views Asked by At

I think this may be my first time posting on Stack Overflow instead of just browsing for already-answered questions.

I am not an avid html user and I am trying to update our splash page for our web app through pgadmin.

I know PostgreSQL has a weird quirk of where it starts to look for things. I believe it currently is rooted in a temp directory that is recreated each time the app starts which isn't ideal for storing a picture for its splash screen so I put the picture in the public pictures directory (C:\Users\Public\Pictures\download.jpg). but using or didn't work I only see the alt text.

So I thought that was maybe because it was starting in this weird directory so I tried doing to go back to C root and go from there but still not working. Has anybody experienced something like this? It can't be that difficult!

Update with code:

<img src=C:\Users\Public\Pictures\download.jpg alt="CMB Logo" height=300>
2

There are 2 answers

0
Deniel Pereira On

The image path you are specifying in the HTML is on your local PC "C:/.." , for it to work you need to enter the path of the image hosted on the server.

0
Joaquim On

Also the src atribute value might need to have double quotemarks, like this:

<img src="C:\Users\Public\Pictures\download.jpg" alt="CMB Logo" height="300">

And C: drive is on your PC so you might be able to see on a browser on your PC however as mention in the previous post, the src attribute can be a link to an image on a server, for example:

<img src="https://some.server.somewhere.com/image.jpg" alt="CMB Logo" height="300">