How do I make a consistency in the form so it only accepts 100x100 images?

Asked

Viewed 63 times

0

I am making a crud type system and has an input field for the user to send his photo, however the photo has to be in size 100x100, there is a way for the form to accept only images of this size or smaller?

  • https://stackoverflow.com/a/8904008/1244639 That answer has what you want.

  • 1) I don’t know if there’s any way around this by manipulating the image tags. 2) I would recommend you accept larger images and allow the user to do the crop on its own account.

1 answer

0


How are things at the ICU?

Cara da pra você fazer isso com javascript, follow a way here: Use jquery.validate to validate image dimensions

And also recommend you do the validation if the image is of the right extensions (PNG,JPEG...etc) and also recommend you use the filesize function to validate if the user is not sending any wallpaper and end the space of your server.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.