Status: Canonical product should
Related: Conversion engine · Attachment intelligence · Contract
How Cimo catches Media Library / editor / builder uploads, runs conversion, and replaces the inbound files with optimized ones before WordPress stores them.
When a user drops or selects convertible files in an allowed location, Cimo:
- Intercepts in the capture phase (beats native upload handlers)
- Resolves a Converter via
getFileConverter - Runs
optimize()(cancellable; progress UI when required) - Queues metadata via
saveMetadatabefore continuing - Re-dispatches a synthetic drop/change carrying optimized
Files marked__cimo_converted - Lets the original WordPress / builder upload path consume the optimized files
Unconvertible files (NullConverter) pass through without blocking the native path.
Free allowlists cover Media Manager and major editor/builder surfaces (see how-it-works / allowedLocations defaults).
Premium may widen via filters (cimo.dropZone.allowedLocations, cimo.selectFiles.allowedLocations), including form selectors and optional * for optimize-all.
- Re-entrancy: events already marked
__cimo_convertedmust not be processed again - Mixed batches: process convertible files; passthrough others; do not hard-bail the whole batch solely because Safari lacks WebP
- Cancel: user cancel calls
converter.cancel()and must not leave the UI wedged window.cimoSettings.disableOptimization: skip interception- Frontend anonymous contexts: follow metadata saver rules (may skip REST save)
- Does not own format encode algorithms (conversion engine)
- Does not own bulk rewrite of existing library files (bulk PRDs)
- Does not replace WordPress media permissions
- Capture-phase listeners are required for drop and file-input paths
- Metadata REST completes before synthetic re-dispatch on successful convert
- Synthetic events set
__cimo_converted - NullConverter batches do not show unnecessary progress chrome
- Premium location widening uses filters, not forks of free listeners