I was reading this http://dev.w3.org/html5/markup/input.file.html, but I only found the \"accept\" attribute.
I tried this
if your using php for the backend maybe you can use this code.
// Validate image file size if (($_FILES["file-input"]["size"] > 2000000)) { $msg = "Image File Size is Greater than 2MB."; header("Location: ../product.php?error=$msg"); exit(); }