Capture resource errors with javascript

I am trying to log resource errors such as missing images via Sentry. I’ve got a basic html page with some non-framework javascript.

	<script src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js" integrity="sha384-wF7Jc4ZlWVxe/L8Ji3hOIBeTgo/HwFuaeEfjGmS3EXAG7Y+7Kjjr91gJpJtr+PAT" crossorigin="anonymous"></script>
<script src="https://browser.sentry-cdn.com/5.15.5/captureconsole.min.js"></script>
<script>
	Sentry.init({
		dsn: 'https://aaaaaa@bbbbb.ingest.sentry.io/cccccc',
		integrations: [
			new Sentry.Integrations.CaptureConsole({
				levels: ['error']
			})
		],
	});
</script>

Using the above I am able to get javascript errors and console message. If I create an img tag with an invalid src, this will show a 404 on the network tab, how can I send that through to Sentry?

Is it even possible to capture this and log it?