Skip to content

Search, sort, and infinite scroll

Find and browse efficiently

Search

  • Where: Search input in the filter row (MediaToolbar).

  • Behavior: Typing triggers a debounced request (e.g. 300–400 ms) to the WordPress media API with a search parameter. Results are filtered by filename, title, alt, caption (depending on backend). The list updates; folder filter can be kept or cleared (see "Results outside folder" in Folder sidebar).

  • Benefit: Quickly find a file by name or caption without scanning the grid.

Sort

  • Options: Newest first, Oldest first, Title A–Z, Title Z–A (in a dropdown in the filter row).

  • Behavior: Changing sort updates the API query (e.g. orderby=date / order or orderby=title). The list refreshes with the new order. In grid view, this applies to the infinite-scrolled list (each "page" is sorted the same way).

  • Benefit: Bring recent uploads to the top or alphabetize by title.

Infinite scroll (grid view)

  • How it works: When you scroll near the bottom of the grid, an IntersectionObserver (or similar) triggers loading the next page of results (e.g. page 2, 3, …). New items are appended to the grid. Loading state (spinner or skeleton) can show at the bottom until the next page is ready.

  • Pagination: The API uses per_page and paged (or offset). Same filters (folder, type, search, sort) apply to every page so the list is consistent.

  • Benefit: Browse large libraries without clicking "Next page"; just scroll.