Describes no image
warning A warning says what Statac did instead, and the build goes on.
A file under content/ is named like an image’s sidecar file, such as
photo-1.jpg.yaml, but there is no image of that name beside it.
What you’ll see
warning Describes no image: there is no `content/photo-1.jpg`
Did you mean `photo-1.jpeg`?
More: https://statac.dev/e/describes-no-image/
In the terminal, the message also shows the file and line, if there is one, and marks the exact text.
Why Statac warns
A sidecar file, named after an image with .yaml added after the
image’s full name, tells Statac about that image: its alt text, its
caption, and whether to publish it unchanged. Statac never publishes
the sidecar file.
If there is no image beside it, there is nothing for it to describe.
Statac carries on without the file and warns you, in case the image was
renamed or moved and its sidecar file left behind.
How to fix it
Name the file after the image it describes, including the image’s file extension, and keep the two in the same folder. If the image is gone, delete the file.
Example
content/, beside content/photo-1.jpeg:
alt: A gradient from blue to orange
Once the file is renamed to content/, it describes
the image.
Its name
| Name | describes-no-image |
|---|---|
| In the terminal | statac explain describes-no-image |
| To stop showing it | quiet: [describes-no-image] in statac.yaml, once you have understood it. Statac still counts it. |
Something unclear or wrong? Open an issue.