Menu

MediaHub 1.22.30 (Beta): Replace file

Public beta — swap a library image's master in place (Replace file), plus field automation and wide-gamut colour fixes. Staging recommended; 1.22.2 remains the production release.

Peter Knight

Peter Knight

9 November 2026

Posted in Products · Tagged ProcessWire, MediaHub

This post was written with AI assistance. The ideas, opinions, and technical decisions are mine. The tone of voice, content structure, and final copy are a mix of my prompts and AI-assisted drafting.

Editors sometimes need a better master file without breaking every place an asset is already used. Renaming paths, re-uploading, and fixing crops by hand is tedious and error-prone. MediaHub 1.22.30 adds Replace file on the library asset detail page: upload a new master in place of the current one while keeping the same asset page, field references, and usage links. Collections, labels, title, alt, and the rest of the library metadata stay on that asset. You choose whether to keep the existing filename on disk or adopt the upload name.


What Replace file does

From asset detail you can replace any uploaded master (images, PDF, video, audio, and other documents). YouTube/Vimeo embed assets are excluded. Same asset page, same references, same collections and metadata.

For images, MediaHub stages the upload, respects your configured maximum dimensions, converts wide-gamut sources to web-safe sRGB when the server can do so safely, then swaps the master on disk. When stored crop geometry still matches the preset, existing crop pages are rebuilt from the new master instead of leaving stale files behind. If dimensions or aspect ratio change, the confirmation shows the old and new sizes, explains what MediaHub rebuilds automatically (crops, variations, URLs), and tells you what it deliberately leaves alone: saved width and height in TinyMCE HTML. It does not open every page and resize embeds. View current asset usage opens the Usage table so you can open affected posts and fix layout yourself.

For PDF and other non-image files, the job is simpler: swap the file, refresh cache where needed, and regenerate preview or duration when the server supports it. There is no crop or image-variation stage because there is nothing to crop.

Larger replacements run as a background job with progress in the admin. An audit entry is written to the media-hub log either way.

Full workflow, staged job, rich text, and logging: Replace file (also summarised on the asset detail page).


Field automation

This release also extends field automation:

  • Crop presets to pre-generate — warm ProcessWire size variations on named crop files (for templates that call resolvedCropImage()), not only on the library original.
  • Also generate WebP sidecars — optional module setting to write .webp beside pre-generated JPEGs when templates pass webpAdd.

Colour you can trust

Profiled uploads (Display P3, Adobe RGB, ProPhoto RGB, and similar) now convert to sRGB before resize, crop, WebP, and replace workflows when the server has a safe converter (Imagick with LCMS on Linux hosting, or ColorSync on macOS). If conversion is not available, MediaHub refuses the file with a clear message instead of silently washing out colour.


Upgrading

Upgrade from 1.22.0 through 1.22.2 through the Modules screen. No database migration. Refresh Process MediaHub afterwards.


Download

MediaHub 1.22.30 is available to signed-in licence holders. The 1.22.2 zip stays online for rollback. Full notes are in the changelog.