ProcessMediaLister by Robin S

Lists images and files from across the site in a sortable and filterable table.

Media Lister

Lists images and files from across the site in a sortable and filterable table. For images you can choose between table, small thumbnails and large thumbnails view modes.

The module retrieves the data using SQL queries so is able to efficiently list media information for all but the largest of sites.

Possible use cases:

  • Check that a nice variety of banner images is used for top-level pages.
  • Find duplicate files/images by sorting by filesize or filename.
  • Find images without descriptions if this is important for use in alt tags.
  • Find large PDF files that would benefit from optimisation.
  • Check for "inappropriate" images, or images that are not "on-brand".

Images in small thumbnails view mode

ml-main

Files saved as a bookmark

ml-main-2

Controls


Media type: Choose between Images and Files.

View mode: When listing images you can choose between small thumbnails, large thumbnails and table view modes. When in one of the thumbnail view modes you can see information about the image in a tooltip by clicking the "i" icon, or edit the page containing the image by clicking the pencil icon.

ml-16

From pages matching: This field allows you to add filters to limit the pages that the media will be listed for.

Add bookmark: Superusers can add bookmarks for the current settings that will be available from the flyout menu for all users. See the bookmarks section below for more information.

Column visibility: Choose the columns that appear in the table and in the information tooltip (when in thumbnails mode).

ml-9

Search: Quickly filters the results to show only items that have the search text in any column, whether the column is visible or not.

ml-11

Custom search builder: For more advanced searches where you can combine conditions for specific columns with AND/OR logic.

ml-10

Pagination: You can navigate through the results and set the number of results per page.

Reset: Click the "Reset" button at the top right to return to the default settings for Media Lister (or for the current bookmark if applicable).

Editing the page that contains the media


For any media result click the link in the "Page" column to open the page that contains the media item in Page Edit. When in thumbnail view mode you can click the pencil icon to achieve the same thing. The field that contains the media item will be focused.

When a media item is contained within a Repeater field this is indicated by an asterisk at the start of the page title. When opening Page Edit for a media item within a Repeater field the Repeater item will be automatically expanded, including for nested Repeaters.

Limitations for values that are merged in the database


The module has limited support for multi-language values and custom fields for images/files. In order to be efficient enough to handle large sets of results the module retrieves raw values from the database, and in the case of multi-language values and custom field values ProcessWire stores these in JSON format in a single database column.

ml-raw-db

The module improves the display of this JSON data by extracting the uploadName value into a separate column, substituting custom field labels for field IDs, adding language names where possible, and by transforming the data into a quasi-YAML format for better readability. Some limitation remain though – for example, if you use Page Reference fields in the custom fields then only the page IDs are displayed.

ml-formatted

Bookmarks


Superusers are able to create a bookmark for the current Media Lister settings by expanding the "Add bookmark" field, entering a title for the bookmark, and clicking the "Add bookmark" button.

ml-2

Bookmarks will be visible to all users from the flyout menu.

ml-5

You can delete a bookmark from the module config screen.

ml-3

Module config


In the module config screen you can define defaults for controls such as media type, view mode, pagination limit and column visibility. You can also delete bookmarks from the module config screen.

ml-4

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #554
    In the 554th issue of ProcessWire Weekly we'll check out the latest core updates, introduce a couple of new third party modules, and more. Read on!
    Weekly.pw / 21 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer