Use naturalHeight and naturalWidth (with support detection and fallback) to fix dynamic image loading and sized image bug