Background image not appearing on dashboard header

I’m trying to add a background image to a dashboard header like so:

type: markdown
  text_only: true
  content: Climate
  card_mod:
    style: |
      ha-card {    
      font-size: 40px;
      background: url('/homeassistant/www/images/background/clouds.png');
      }

No error, but no image is appearing. I’m certain there is a file at that path and I can open it with File Editor. What am I doing wrong?

UPDATE:

I have tried a few things that have not fixed the problem:

  • Changed the path to /local/images/background/clouds.png
  • Ensured I can access this directly via browser
  • Confirmation that card-mod is installed and enabled in configuration.yaml and appears in HACS integrations
  • Applied a simple border using card-mod, which did work
  • Removed text_only: true which didn’t change the background issue
  • Tried applying the background like so --ha-card-background: url('/local/images/background/clouds.png')