Hm, I think I found a solution. I can’t easly acccess the current page object.
So I changed the file.create:after
hook and added a simple $file->update()
and moved the thumbnail creation to the file.update:after
hook. Which seems to execute quite well, the only issue might be that the thumbs now are created everytime the file model gets updated. I could not figure out if there is another hook that is triggered by $kirby->thumb()
.