Upload and display an image in Javascript/jQuery

Was a dumb question, fixed it.

I think it’d be easier to get help if you posted the code you have.

I’m not sure if it’s even possible with only jQuery upload image because Javascript is client side and not server side. This means Javascript interacts with your computer and can not access server. jQuery with AJAX is possible but you need PHP too.

This tutorial is for uploading images with PHP. But for running PHP you need to be server so you need to download WAMP (on Windows) or LAMP (on Linux)

https://www.w3schools.com/Php/php_file_upload.asp

This tutorial is jQuery (Ajax) + PHP, but I didn’t tested it maybe it’s not working

To allow users to upload images to your site requires backend logic, meaning that you need to program the server to store your image and probably have a pointer to it in some kind of database. This is outside of the scope of this course. We learn Javascript only for front-end browser execution. As @schmeedy wrote you’ll either need to learn PHP or NodeJS (way beyond what we covered in the course) or Ruby on Rails or other backend technologies.