To get an image size on the webpage, you could ask to server. i.e; use URLConnection class to represent a communication link between application and that URL.
URLConnection urlConnection = new URL(we.getAttribute("src")).openConnection();
size = urlConnection.getContentLength();
This should work well and check the condition which has more than 50kB and get those urls. Hope this code must helps you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…