# Preview images in panel too big

**URL:** <https://forum.getkirby.com/t/preview-images-in-panel-too-big/19457>\
**Category:** Questions\
**Created:** [September 22, 2020, 1:47pm UTC](https://forum.getkirby.com/t/preview-images-in-panel-too-big/19457 "2020-09-22T13:47:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![owzim](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/owzim/32/12457_2.png) [@owzim](https://forum.getkirby.com/u/owzim)\
**Post date:** [September 22, 2020, 1:47pm UTC](https://forum.getkirby.com/t/preview-images-in-panel-too-big/19457/1 "2020-09-22T13:47:35Z")

</div>

If the images have a layout of cards, the previews generated are 1408 pixels in width. Thats’s way too big for the tiny size they are displayed in.

I tried to change the size with a custom `pageMethod`

```php
'preview' => function()
{
    return $this->images->first()->resize(300);
},

```

and in my section:

```yaml
image:
  query: page.preview
  cover: true

```

the previews are not shown ☹

without the resize it works:

```php
'preview' => function()
{
    return $this->images->first();
},

```

So two questions:

1. Why is the resize not working in the page method? `resize` returns just another image object, or does it not?

2. Why are preview images so large and are there other methods to make them smaller?

Thanks!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 22, 2020, 2:25pm UTC](https://forum.getkirby.com/t/preview-images-in-panel-too-big/19457/2 "2020-09-22T14:25:33Z")

</div>

> [@owzim](#):
>
> `resize` returns just another image object, or does it not?

Nope, resize returns a FileVersion object, not a File object.

As regard thumb sizes, see this issue: [Panel loads huge images in cards layout · Issue #2488 · getkirby/kirby · GitHub](https://github.com/getkirby/kirby/issues/2488)
