JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<input type="file" id="file" />

<h4 id="fileSize"></h4>
<html>
<body>
<img src="https://wwwqa.vdm.ford.com//content/dam/vdm_ford/live/en_us/ford/nameplate/ecosport/2018/collections/Equipment/3_2/2018_ecosport_titanium_hotspot_32.jpg/jcr%3acontent/renditions/cq5dam.thumbnail.319.319.png"  />
    <img src="https://wwwqa.vdm.ford.com//content/dam/vdm_ford/live/en_us/ford/nameplate/ecosport/2018/collections/Equipment/3_2/2018_ecosport_titanium_powerpoints_32.jpg/jcr%3acontent/renditions/cq5dam.thumbnail.319.319.png" />
   <img src="https://wwwqa.vdm.ford.com//content/dam/vdm_ford/live/en_us/ford/nameplate/ecosport/2018/collections/features/3-2/2018_ecosport_rearviewcamerafade_32.jpg/jcr%3acontent/renditions/cq5dam.thumbnail.319.319.png"  />
  
       
</body>
</html>

JavaScript

var _URL = window.URL || window.webkitURL;
var images = document.getElementsByTagName('img');
$("img").change(function(e) {
    var file, img;


    if ((file = this.files[0])) {
        img = new Image();
        img.onload = function() {
            $("#fileSize").text(this.width + "x" + this.height);
        };
        img.onerror = function() {
            alert( "not a valid file: " + file.type);
        };
        img.src = images.src;


    }
    alert(this.height);
    if(this.height>180){
    document.getElementsByTagName('img').hide();
    }

});