Add hooks to get current image width and height