fix(assets): harden vendored image-size box and entry checks (#17747)