how to get the jpg file and upload image from input code example
Example 1: accept only image files upload html
<input type="file" name="myImage" accept="image/x-png,image/gif,image/jpeg" />
Example 2: how to upload image in html
<form action="/action_page.php">
<label for="img">Select image:</label>
<input type="file" id="img" name="img" accept="image/*">
<input type="submit">
</form>