Check if an image actually resolves to a successful HTTP status code e.g. 200 (OK). imageExists returns a promise, so make sure the browser you're using supports promises e.g. Chrome. If not, then you can look at using a polyfill (https://github.com/components/es6-promise) or if you're feeling adven...