Alert screenshots show Pending state instead of Firing after first alert

Issue:

  • First alert after Grafana restart: Screenshot shows correct Firing state (red)

  • All subsequent alerts: Screenshots show Pending state (yellow) instead of Firing

Root cause observation: I have the impression that the screenshot is captured a few seconds before the alert status changes, i.e. while Pending is still in progress.

Environment:

  • Grafana 12.x with grafana-image-renderer

  • Configuration: Pending period 2m, Group wait 3m30s

What I’ve tried (no effect):

  • Setting CACHE_TTL=0s

  • Various Pending/Group wait combinations (30s-8m)

  • Enabling UPLOAD_EXTERNAL_IMAGE_STORAGE=true

Technical observation: Screenshot rendering takes ~5.5 seconds and appears to capture panel state before the alert fully transitions from Pending to Firing. This only happens after the first alert - first alert after restart always works correctly.

Question: Is there internal state caching between alerts causing this? How can I ensure screenshots consistently capture the Firing state?

Workaround needed: Currently must restart Grafana before each alert to get correct screenshots.