In this project we have to develop a image upload functionality in PHP. The functionality can be used to allow the users to upload profile picture, or upload an image for any kind of product.
Image upload requirements
- Image format should be only .jpg file
- Image size should not exceed 20kb
- Image dimension should be in a ratio of 4:3 for better rendering on mobile devices
- Create a folder name users and store the upload file in this folder
Image upload files for practice and instructions
Download the attached zip file that has all the following files for you to be able to build the functionality
- html file with css and form
- the html file has 3 state of the form, the default form, the error state and success state
- it has 2 jpg files, one jpg file is heavy and does not match the requirement. The other jpg meets the requiremetns.
- There is png file, which should not be accepted either as per the requirement.
- As per the requirement the form should only upload the right file
Image upload hints
- You can get some validation help from this project New user registration sign-up form