Skip to content

Administration UI for core preview settings #63795

Description

@rayvincent2

Tip

Help move this idea forward

  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.

Preview configuration today lives almost entirely in config.php / occ, while the effects show up in Files, Photos, Memories, and public shares. That split is hard to operate:

  • enabledPreviewProviders is a replace-the-whole-list whitelist. Adding TIFF (or enabling one extra class in Memories) can silently drop JPEG/PNG if the admin copies a partial array.
  • On current master the array is membership only. Order in config.php does not change try-order. Overlapping MIME types (Imaginary vs native HEIC, ImaginaryPDF vs Imagick PDF) are tried by MIME-regex length, not admin intent.
  • Availability is invisible. Enabling Movie without ffmpeg, or Imaginary without preview_imaginary_url, looks successful in config and then produces no thumbnails.
  • Responsibilities are split across three places: core config.php, the Preview Generator app (sizes / schedule), and Memories admin (some core preview keys). Docs describe best practice, but the installed instance does not.
  • Failed generations (HEIC via Imaginary, missing preview blobs after preview:cleanup, etc.) are only visible in logs / occ. Repairing one file at a time with occ preview:generate does not scale.

Describe the solution you'd like

A core Administration → Previews page (/settings/admin/previews) that is the supported UI over the existing preview config model. No new public API for Memories / Preview Generator. Same keys, same class-name list.

User stories:

  • As an administrator, I want to see the full provider catalog with availability (ffmpeg, Imagick format, LibreOffice, Imaginary URL), so I cannot enable a provider the host cannot run.
  • As an administrator, I want to enable/disable providers and set global try-order, so if Imaginary fails for HEIC the native HEIC provider still runs.
  • As an administrator, I want to edit the existing limits, quality, concurrency, Imaginary URL/key/preview_format, and ffmpeg / LibreOffice paths from one page, so I do not hand-edit PHP arrays for day-to-day changes.
  • As an administrator, I want a failure list with retry/clear, so I can see why HEIC/PDF/video thumbs never appeared and re-run them without one-off occ per file.
  • As an administrator, I want Reset to defaults to restore the recommended list for this host (builtin natives; Imaginary first if a URL is set; native HEIC appended only if Imagick can decode HEIC), without auto-enabling Movie or ImaginaryPDF.

Non-goals (keep elsewhere)

  • Preview Generator size lists, workers, preview:pre-generate / preview:generate-all schedule.
  • Changing occ preview:generate, preview:cleanup, or preview:repair.
  • HTTP Cache-Control / proxy caching of preview responses.
  • Object-store vs local preview storage internals.

Describe alternatives you've considered

  • Keep using config.php + occ config:system:set. Works for automation, easy to break the whitelist, no availability UX.
  • Memories admin. Convenient for photo people, but it is the wrong owner for core provider policy and it can write a partial enabledPreviewProviders list.
  • Preview Generator admin / OCC only. Excellent for bulk pre-generation; it does not decide which providers exist or why a type never generates.
  • PR #63486 (regenerate when the stored preview file is gone) helps the “DB row exists, blob missing” case on local storage. It does not explain HEIC/provider failures or give a retry UI.

Additional context

A product spec and implementation already exist for this page (core settings Vue + PreviewAdminConfig + failure table + Playwright). Intent:

  • Read/write the same keys (enable_previews, enabledPreviewProviders, max size/memory/filesize, jpeg/webp quality, concurrency, Imaginary, ffmpeg/LibreOffice paths, preview_expiration_days).
  • Treat array order as generation try-order while keeping the whitelist contract apps already use.
  • Do not rewrite an explicit list on load. First Save from the UI is what persists the key.
  • Filling a path/URL unlocks the matching switch; it does not auto-enable Movie just because ffmpeg was found.

Happy to attach screenshots and link the PR once the issue number exists.

Docs follow-up (not blocking the UI)

Current previews RST still assumes config.php-only and has a few stale bits the page already encodes: default max size is 4096, OpenDocument does not need LibreOffice, MP3 is not in the builtin default list, Imaginary-first is the production recommendation when a URL is set.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions