Use a file path from your personal computer to upload an image

so my question is kind of complex. if you can use a file path from your personal computer to upload an image into your HTML, then doesn’t using that file path open up the possibility of someone looking into your computer? hacking? I’m assuming the reason we would want to use a third party website to upload our photos (and i’m sorry but the only one thats coming to mind is something like photobucket LOL XD) is to avoid such an attack on our personal file systems?


is the .html file also on your computer? Then no, the website can only be accessed from your computer.

to share the website within the LAN, you would need a web server (which is just a piece of software you can install on your PC). Now your computer acts as server, but just within your local area network (the network your computer is connected to). Assuming this is your home network or a network that you trust, it should be fine.

to expose your website to the world wide web, you would need to take a next step, which is opening a port on your router. This is where security becomes a risk, now people do have access to your website, so if the webserver isn’t properly configured, you might get hacked

this is why its uncommon to host websites from your own computer, you really need to know what you are doing.

this is why services like amazon AWS and so exist, you can use those, then you don’t risk your own computer

if you really want to host your own website, use things like docker or VM to isolate the webserver (and files like images associated with the website) from the rest of your computer.