Jump to content

Recommended Posts

Posted

image.thumb.jpeg.56a877b9fa11108b3fa867c60955e964.jpeg

Happy Wednesday, everyone!

Does such a thing exist? Such a question is beyond this post's remit. So let me introduce you to MediaHub 1.20.0 to 1.20.1 instead, which features:

  • Field automation (pre-generated sizes, collection filing, labelling)
  • findRaw() variations
  • SVG display in the library
  • Library and picker polish
  • Integrator hooks

We're going without screenshots today, since most changes aren't terribly visual. 

Field automation
A collection of field automations that shortens the resize–file–label round-trip after every upload.

Pre-generated size variations.
Give a field a list of sizes, MediaHub will generate those variations up front on upload and save. The first visitor gets a cache-hot image instead of triggering GD on demand.

These are ordinary ProcessWire variations on disk, not separate library items: they do not appear in the grid and do not inflate your asset count. A per-request limit keeps large galleries from hitting PHP's execution-time cap.

Automatic collection filing.
Point a field at a collection path, static (e.g. /news/images/) or built from the page's own fields (e.g. /news/{title}/{date:Y-m}/), and its assets are automatically filed into that collection when the page saves.  Missing collections are created automatically.

Automatic labelling.
Same idea for library labels: a static list, or labels built from page fields (e.g. {category.title}). Labels are applied on save; empty placeholders are skipped. 

Slow-save overlay.
When automation makes a save take a moment, a brief loading overlay appears in the page editor so it does not look broken. 

Thanks to @David Karich of Flipzoom for the automation concepts, code samples and testing.
Full setup steps and more examples are in the new Field automation documentation.

findRaw() variations (1.20.0)

findRaw() now accepts an opt-in variations field: name, URL, dimensions, filesize for size variations already on disk. These are read-only and pair with pre-generated sizes for cache-hot galleries without lazy resize on first visit.

Docs: findRaw

SVG display in the library

SVG support arrived in 1.17, but transparent SVGs were still hard to work with in the library. White or light artwork could disappear against the tile background, and the artboard edge was unclear.

1.19.52 treats transparent SVGs properly across grid, list, masonry, and asset detail views: a dot-grid preview behind the artwork, a subtle frame with drop shadow and corner radius, and masonry that no longer upscales icons and logos beyond their intrinsic size (photos still fill the column width).

If your library holds brand marks or UI icons as SVG, browsing them should feel much closer to working with raster thumbnails.

Thanks to @Stefanowitsch for flagging this.

Library and picker polish

Bulk delete with usage awareness.
Selecting multiple assets and deleting them used to show a generic confirmation even when some were still referenced on pages. The dialog now checks all selected assets in a single pass (one query per field, not one per asset). When any are in use, the message leads with how many are used on pages, matching the tone of the single-asset warning, and the confirm button reads Delete Anyway.

Picker sidebar resize.
The main library sidebar gained resize in 1.19.51, but the picker modal's handle was visible without doing anything. 1.19.52 fixes drag-to-resize in the picker and remembers the picker's width separately from the main library.

Template picker hygiene.
MediaHub's internal templates no longer appear in ProcessWire's "Add New Page" template picker at arbitrary tree locations. They are hidden from editors and tagged for clearer grouping under Setup → Templates. Thanks @Didier B.

 

There's a ton of other stuff in 1.20.X spanning a few releases. The Changelog is up to date and a good place to see everything across the releases.

Thanks for reading
Peter

 

 

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...