---
title: keepsAttachment
description: >-
  Whether the build may publish the attachment at `path` inside the vault:
  discovery reads its folder and the exclude patterns let it through. The build
  publishes it only once a published note references it.
updated_at: '2026-11-19T22:03:58+01:00'
created_at: '2026-03-07T03:07:51+01:00'
symbol:
  kind: function
  name: keepsAttachment
  signatures:
    - >-
      keepsAttachment(config:
      Pick<[[reference/api/core/ResolvedConfig|ResolvedConfig]], "exclude">,
      path: string): boolean
  parameters:
    - name: config
      type: 'Pick<[[reference/api/core/ResolvedConfig|ResolvedConfig]], "exclude">'
    - name: path
      type: string
  returns:
    type: boolean
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/packages/plugins/src/filter-unpublished.ts#L41
---

# keepsAttachment
