Dynamic gallery auto updates itself when you attach new images to a media category or detach them from it.

What’s required?

To make a dynamic gallery we need two things:

  • Advanced Editor Tools by Automattic — a plugin that makes the Classic Editor block in Gutenberg block editor more convenient to deal with.

The admin page with the Classic Block and gallery in it before installing this plugin:

Classic Editor with Gallery Shortcode

The same admin page after activating Advanced Editor Tools:

Classic Editor Advanced

  • Enable Media Shortcodes in SettingsMedia LibraryMedia Shortcodes (section).

Settings :: Media Library :: Media Shortcodes

How to create a dynamic gallery

Note: For performance it’s better to use IDs instead of slugs in the gallery shortcodes.

Available attributes

In addition to the WP built-in gallery attributes.

  • media_category or any other taxonomy name
  • monthnum
  • year
  • limit of media items to show

Dynamic gallery with EML PRO

Dynamic gallery’s front-end

To style gallery’s front-end use any plugin that works with WordPress native gallery shortcodes like Justified Gallery or Meow Gallery.

Advanced features for the front-end are coming with the future updates of Enhanced Media Library.

Gallery’s front-end in pure Twenty Twenty-Four theme:
Gallery front-end in pure Twenty Twenty-Four

Gallery’s front-end with Justified Gallery plugin:
Gallery front-end with Justified Gallery plugin