Skip to content

Add retry logic, network resilience, and missing image sizes UI for media uploads #76790

@adamsilverstein

Description

@adamsilverstein

Summary

Enhance client-side media processing with three reliability improvements:

  • Automatic retry with exponential backoff — Failed uploads should be retried up to 3 times with increasing delays (1s → 2s → 4s) and jitter to prevent thundering herd
  • Network resilience — Upload queue should pause when the browser goes offline and resume automatically when connectivity returns
  • Missing image sizes UI — When images have incomplete sub-sizes (e.g., from interrupted uploads), the editor should show visual indicators and let users generate them on demand

Missing Image Sizes — User Flow

Instead of auto-generating missing sizes silently on editor load, give users control:

  1. Info icon on images — A small indicator appears on images with missing sub-sizes
  2. Popover with Generate action — Clicking the icon shows details and a link to trigger generation
  3. Pre-publish check — The "Are you ready to publish?" panel warns about missing sizes with a bulk Generate option

Retry Flow

flowchart LR
    A[Upload] --> B[Processing]
    B --> C{Success?}
    C -->|Yes| D[Complete]
    C -->|No| E{Retryable?}
    E -->|No| F[Failed]
    E -->|Yes| G{Attempts < 3?}
    G -->|No| F
    G -->|Yes| H[Wait with backoff]
    H -->|1s / 2s / 4s| B
Loading

Network Resilience

flowchart LR
    A[Upload Queue] --> B{Browser Online?}
    B -->|Yes| C[Continue Processing]
    B -->|No| D[Pause Queue]
    D --> E[Wait for reconnect]
    E -->|online event| F[Resume Queue]
    F --> C
    C --> G[Complete]
Loading

Acceptance Criteria

  • Failed uploads retry up to 3 times with exponential backoff
  • Upload queue pauses when offline and resumes on reconnect
  • Info icon appears on images with missing sub-sizes
  • Clicking icon shows popover with Generate link
  • Generate creates missing sizes and hides indicator
  • Pre-publish panel shows Missing image sizes suggestion
  • Generate in pre-publish processes all missing sizes with spinner

PR: #76765

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions