I'm currently trying to get the image width / height removed. I am developing a link exchange module, for example, when you insert a link to facebook, you can see the name, description and images.
So, I tried using php getimagesize to get the width / height of the image very slowly.
So, I'm thinking of using a jquery solution to get the remote image width / height so that I can filter the image width below 100 pixels.
I am new to jquery / javascript
I tried something like
var img = $('#imageID'); var width = img.clientWidth; var height = img.clientHeight; $('#info').html(width+'.. height: '+height);
It does not work and returns undefined .. height: undefined
Any help is appreciated.
thanks
javascript jquery
cicakman
source share