### Bug description

When I include an anonymous figure without extension i.e. `![](test)`, and I have the default extensions set for pdf and html output in a book I get the following error 


```
Error running filter /opt/quarto/share/filters/quarto-post/quarto-post.lua:
/opt/quarto/share/filters/quarto-post/quarto-post.lua:2277: attempt to index a nil value (field 'attr')
stack traceback:
        /opt/quarto/share/filters/quarto-post/quarto-post.lua:1119: in function </opt/quarto/share/filters/quarto-post/quarto-post.lua:1113>
```

my _quarto.yml has the following shape:

```
project:
  type: book

book:
  title: "mwebib"
  author: "Jane Doe"
  date: "10/10/2022"
  chapters:
    - index.qmd
    - intro.qmd
    - summary.qmd
    - references.qmd

bibliography: references.bib

format:
  html:
    theme: cosmo
    cite-method: citeproc
    default-image-extension:  svg
  pdf:
    documentclass: scrreprt
    cite-method: biblatex
    default-image-extension:  tex
```



cscheid
2022-10-16T16:32:30Z
lcnbr
bug needs-repro
v1.3
closed
Anonymous figure and default-image-extensions don't work together
https://github.com/quarto-dev/quarto-cli/issues/2877