Pure JS implementation for detecting image dimensions