Fix poor accuracy in getting calculated image dimensions
I have an image that has a smaller calculated width/height when I view it in the browser. However, phantomJsCloud is not picking up on this true calculated height. I set the viewport width to something small. I am injecting a script that is trying to use various methods of getting these calculated dimensions but they are all just passing back the native dimensions. I am trying to use these but they are all giving the wrong result:
$(img).width()
img.offsetWidth
img.clientWidth
window.getComputedStyle(img, null).getPropertyValue("width")
Even when I change the viewport width that I pass in, the image dimensions don't change (but they certainly do when I visit this site in the browser).
hi, please try again. we are now on a new version of chrome so may work now.