I want to create asset subfolders by page & by asset type.
I use an asset field in an matrix field for multiple asset types like video, images etc.

In an asset field I can access the slug of an entry by:

Is there a way to access a an asset field inside an matrix block to fetch the kind for the asset subfolder? Like


To create an subfolder like


1 Answer 1


Assuming the Assets field on your block has a handle of asset, you could do:

  • I already tried this approch: The Asset field’s Default Asset Location setting has an invalid subpath (“{object.asset.one().kind}/{owner.slug}”).
    – pepe
    Oct 13, 2021 at 7:03
  • This works. What's the handle of your Assets field?
    – Oli
    Oct 13, 2021 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.