# How to display an image using the thumb

**URL:** <https://forum.getkirby.com/t/how-to-display-an-image-using-the-thumb/31763>\
**Category:** Questions\
**Tags:** v4\
**Created:** [June 3, 2024, 11:32am UTC](https://forum.getkirby.com/t/how-to-display-an-image-using-the-thumb/31763 "2024-06-03T11:32:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_E](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mark_e/32/10834_2.png) [@Mark\_E](https://forum.getkirby.com/u/Mark_E)\
**Post date:** [June 3, 2024, 11:32am UTC](https://forum.getkirby.com/t/how-to-display-an-image-using-the-thumb/31763/1 "2024-06-03T11:32:38Z")

</div>

Any ideas why the image is not displaying?

```auto
<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:

> **[Image thumbnails](https://getkirby.com/docs/guide/files/resize-images-on-the-fly)**
>
> Kirby's built-in thumb creator lets you resize and crop any image on the fly in your templates. You can not only resize and crop images from the content folder, but also from the assets folder …

---

<div class="post-metadata">

**Author:** ![Mark\_E](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mark_e/32/10834_2.png) [@Mark\_E](https://forum.getkirby.com/u/Mark_E)\
**Post date:** [June 3, 2024, 11:57am UTC](https://forum.getkirby.com/t/how-to-display-an-image-using-the-thumb/31763/2 "2024-06-03T11:57:05Z")

</div>

This works:

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

```
