Fixed issue where image dimensions were not yet known because image wasn't loaded yet