How to display an image using the thumb

Any ideas why the image is not displaying?

<img src="<?= $page->second_image()->thumb(
	[
		'width'     => 780,
		'height'    => 520,
		'crop'      => 'center',
		'format'    => 'webp',
		'quality'   => 90,
	]
)->url() ?>">

I’m trying to following the info here:

This works:

<?php if($image = $page->second_image()->toFile()): ?>
	<img src="<?= $image->thumb(
		[
			'width'     => 780,
			'height'    => 520,
			'crop'      => 'center',
			'format'    => 'webp',
			'quality'   => 90,
		]
	)->url() ?>">
<?php endif ?>