Is it required to have at least one field in a file blueprint?

Hi,

I am using a file blueprint to set some options for uploaded images. It looks like this:

/blueprints/files/image.yml

title: Image
accept: image/*
create:
  width: 2880

Nothing complicated, just a resize on upload and restricting files to images only. This is the relevant field in my image block:

mhd-image.yml

fields:
  image:
    type: files
    multiple: false
    label: Image
    template: image
    uploads: image
    size: full
    layout: cards
    empty: Select or upload an image

When I add an image the template is being applied, it is being resized, all that good stuff.

The issue I am having is when the image is clicked on in the panel, below the file info the following warning is displayed:

This file has no blueprint yet. You can define the setup in /site/blueprints/files/image.yml

Now if I add a field to the image.yml file blueprint this goes away, but I don’t need any in this case. And I don’t want the warning displayed to an editor as it looks like something has gone wrong.

Is it a requirement to have a field in a file blueprint? Or is there some way I can stop this warning appearing?

You could add an info field with a different message? However, I would argue that images should at least have an alt field?

You can make the page empty with a hidden field or make it something useful like the permalink.

fields:
  hide:
    type: hidden
fields:
  permalink:
    type: info
    label: Permalink
    text: "{{file.permalink}}"

Thanks both

I have an alt field as part of the block, so it isn’t needed in the file blueprint as well. I am using the packaged image block as a reference, where this is how it is implemented too (which also has the same warning when viewing the image).

An info field is a good solution, I think I will go for that.