when using data-uris the clientWidth is not available inside the onload handler