How to get the height and width of image in jquery if I am using img with class "img-responsive" and not given any height, width, max-height, max-width etc.
I don't want real height and width of Image which we can get from getHeight and getWidth but I want the exact height and width which I am able to see like in mobile browsers I see small height and width and in desktop or laptop the bigger height and width.
This is the Desktop View
This is the Mobile View
I want to know that how many pixels of my screen is covered by that image.
You can use jQuery to accomplish this:
$(window).resize(function(){
var imgWidth = $('.yourImage').width();
var imgHeight = $('.yourImage').height();
});