In gatsby-source-prismic plugin shouldDownloadFiles option, is there way to select all files except listed?
I know you can manually select image queries by something like: page.data.body.attachments.items.attachment': true,
or all images by shouldDownloadFiles: true,
Hi @rmatsumoto!
This is possible. shouldDownloadFiles accepts three types of values:
Boolean
Function (receives the field as its only argument)
Object mapping field paths to a boolean or function (receives the field as its only argument)
Specific fields can be ignored by doing #2 or #3.
With #2, you can check the field's attributes (including its URL and size) to determine if the file should be downloaded. With #3, you can do the same as #2, but only for a specific field.