简体   繁体   中英

Resize image on client side before uploading to the server

There is plenty of information on the web about resizing an uploaded image on the server. I can't find any information about resizing it on the client instead.

I am using this PHP code to handle the upload. It works, but my web server only accepts uploads of 2 MB or smaller. Therefore, I want the client side code to resize the uploaded image to be no larger than this.

No. PHP is a server side language. You cannot resize images on client side with PHP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM