← All stories

BRANCH · ef-059-email-images-gifs

Email images, GIFs, and responsive sizing

EF-059Persona: OrganizerRoots in: event-setup

An organizer uploads R2-backed images and GIFs, adds them to email, clamps width and height for responsive rendering, and sees missing-alt or oversized-image warnings before send.

Preconditions

Fixture event has upload permissions, sample image/GIF assets, missing-alt variant, oversized variant, and empty-audience segment.

Happy path

  1. Upload asset.

    Uploader validates MIME, size, progress, and R2 persistence.

  2. Set sizing.

    Width and height clamps keep email images responsive.

  3. Preview and send.

    Missing alt and oversized warnings block or warn according to policy.

Failure modes

Send blocked on validation failure

Trigger: asset lacks required metadata or sizing is invalid.

Resolution: 400 validation blocks send and no email leaves.

Bounced recipient tracked and suppressed

Trigger: image email bounces.

Resolution: email_events records bounce and suppression prevents future sends.

Scheduled-message edit window

Trigger: scheduled asset-backed email is edited after cutoff.

Resolution: 409 PAST_EDIT_WINDOW.

Retry on transient failure

Trigger: provider 5xx.

Resolution: retry uses same Idempotency-Key and sent_count remains one.

Idempotency-key on test-send

Trigger: test-send double-click.

Resolution: one asset-backed test email is sent.

Recipient resolution empty

Trigger: audience resolves to zero.

Resolution: 409 NO_RECIPIENTS with empty-audience copy.

Token rendering fallback

Trigger: image caption token is missing.

Resolution: fallback text renders, not blank caption.

Cancel scheduled before send

Trigger: scheduled asset email is cancelled.

Resolution: queue drains, sends refund, and audit row is written.

Missing-alt warning

Trigger: image/GIF has no alt text.

Resolution: preview surfaces visible warning before render/send.

Oversized image clamp

Trigger: uploaded asset exceeds email-safe dimensions.

Resolution: renderer clamps width/height and warns.

Deployed-runtime gap

Trigger: deployed run on 2026-04-29 observed email asset sizing PATCH 404; the probe locks this in until the gap is closed.

Resolution: the story expects the 404 until deployed sizing update exists.

Stable test attributes

Visibility teeth. Each attribute must be effectively visible when active.

email-assets-pagePageAsset surface
email-asset-uploaderPageUpload
email-asset-listPageAssets
email-asset-sizing-controlsInspectorWidth/height
email-asset-previewPreviewRendered asset
email-asset-alt-warningPreviewMissing alt
email-asset-size-warningPreviewOversized
email-asset-send-ctaToolbarSend
email-asset-gap-panelPageRuntime gap

Agent test plan

- email-assets-renders
- upload-email-asset
- patch-asset-sizing
- deployed-runtime-gap