This here cannot possibly work, because you have set $data to the page object, which you cannot loop through, so I’m surprised you are not getting an error here.
This is really interesting code, but cannot possibly work. thumb() is a file method which you can only call on a single file, not on a files collection. So what you need to do: First filter you images collection, then loop through the collection to create an array of thumb files
Hey texnixe,
Thanks for the reply.
I didn’t manage to implement your code in mine,
though, I found out that 'images' => $article->images()->filterBy('template', 'videoimg')->shuffle()->limit(3)->values(fn ($image) => $image->thumb(["width" => 300])->url()), is also working fine.