Change of the image size getter

Use the property width/height instead of the attribute. If a base64
image is used, it has no attribute defined