code: public int getWidth() {
          try {
              return ((RemoteWebElement) getElement()).getSize().width;
          } catch (NumberFormatException e) {
              throw new WebElementException("Attribute " + WIDTH + " not found for Image " + getLocator(), e);
          }
      }
docs: This function is to get image's width.
  
  @return the image's width
  
  @throws WebElementException