Plugin Directory

Media Library Assistant

Enhances the Media Library; powerful [mla_gallery], taxonomy support, IPTC/EXIF/PDF processing, bulk/quick edit actions and where-used reporting.

Other Notes

In this section, scroll down to see highlights from the documentation, including new and unique plugin features

NOTE: Complete documentation is included in the Documentation tab on the Settings/Media Library Assistant admin screen and the drop-down "Help" content in the admin screens.


Media Library Assistant includes many images drawn (with permission) from the Crystal Project Icons, created by Everaldo Coelho, founder of Yellowicon.

Many thanks to Aurovrata Venet, Il'ya Karastel and Kristian Adolfsson for testing and advising on the multilingual support features!

*NEW* Argument Substitution Parameters for custom markup templates

A markup template can include default values for any of the shortcode parameters and values you define for your own use, e.g., you can add columns=1 to the arguments section to change the MLA default value whenever the template is used. The argument substitution parameter(s) you define in the markup template are treated as if you had added them to the shortcode that uses the template, but parameters you actually use in the shortcode will overide the default values you code in the arguments section. For example, if the arguments section of your "blue-table" markup template looks like:

columns=1 div-class=blue div-id=id3

and your shortcode is

[mla_gallery mla_markup=blue-table div-id=ID5]

the end result will be as if you had coded

[mla_gallery mla_markup=blue-table div-id=ID5 columns=1 div-class=blue]

The custom parameters you code in the arguments section become part of the shortcode parameters. To access them in your template or in other shortcode parameters you must use the 'query:' prefix, e.g., [+query:div-class+] in the template or {+query:div-id+} in another shortcode parameter.

In the arguments section you can separate the parameters with one or more spaces or you can code them on separate lines. If your parameter value includes spaces you must enclose it in single or double quotes.

Support for the "Admin Columns" Plugin

The Admin Columns plugin allows you to customize columns on several admin-mode screens, including the MLA Media/Assistant submenu screen. All you have to do is install the plugin; MLA will detect its presence and automatically register the Media/Assistant submenu screen for support. With Admin Columns, you can:

  • Reorder columns with a simple drag & drop interface.
  • Re-size columns to give more or less space to a column.
  • Remove (not just hide) columns from the submenu table.
  • Add new columns for custom fields and additional information.
  • The Admin Columns "Pro" version adds support for ACF fields and other capabilities.

When Admin Columns is present you will see a new "Edit Columns" button just above the Media/Assistant submenu table. Click the button to go to the Settings/Admin Columns configuration screen. There you will see "Media Library Assistant" added to the "Others:" list. Click on it to see the configuration of the Media/Assistant submenu screen.

You can find detailed configuration instructions at the Admin Columns web site Documentation page.

When you have completed your configuration changes, click "Update Media Library Assistant" in the Store Settings metabox at the top-right of the screen. You can also click "Restore Media Library Assistant columns" to remove your changes and go back to the MLA default settings. Click the "View" button at the right of the Media Library Assistant heading to return to the Media/Assistant submenu screen and see your changes.

[mla_gallery] Post Type, Post Status support

For compatibility with the WordPress [gallery] shortcode, these parameters default to post_type=attachment, post_status=inherit. You can override the defaults to, for example, display items in the trash (post_status=trash).

You can change the post_type parameter to compose a "gallery" of WordPress objects such as posts, pages and custom post types. For example, to display a gallery of the published posts in a particular category you can code something like:

[mla_gallery category=some-term post_type=post post_status=publish post_mime_type=all]

Note that you must also change the post_status and post_mime_type because the default values for those parameters are set for Media Library image items.

For posts, pages and custom post types some of the other data values are used in slightly different ways:

  • Title - Taken from the Title of the item.
  • Caption - Taken from the Excerpt of the item.
  • ALT Text - Not used.
  • Description - Taken from the Content of the item.
  • Thumbnail - Taken from the Featured Image of the item, if set. You can use the size parameter to display any of the available image sizes. If no Featured Image is set, the Title will be used instead.
  • Page Link (link=page) - Taken from the "guid", or "short form" of the link to the item.
  • File Link (link=file) - Taken from the permalink to the item.

You can find all the parameter values and more examples in the WP_Query class reference Type Parameters and Status Parameters sections.

WPML & Polylang Multilingual Support; the MLA Language Tab

Media Library Assistant provides integrates support for two popular "Multilanguage/ Multilingual/ Internationalization" plugins; WPML and Polylang. These plugins let you write posts and pages in multiple languages and make it easy for a visitor to select the language in which to view your site. MLA works with the plugins to make language-specific Media library items easy to create and manage.

MLA detects the presence of either plugin and automatically adds several features that work with them:

  • Language-specific filtering of the [mla_gallery] and [mla_tag_cloud] shortcodes.
  • Media/Assistant submenu table enhancements for displaying and managing item translations.
  • Term Assignment and Term Synchronization, to match terms to language-specific items and automatically keep all translations for an item in synch.
  • Term Mapping Replication, to manage the terms created when mapping taxonomy terms from IPTC/EXIF metadata.

Items, Translations and Terms

Each Media Library item can have one or more "translations". The item translations are linked and they use the same file in the Media Library. The linkage lets us know that "¡Hola Mundo!" (Spanish), "Bonjour Monde" (French) and "Hello world!" (English) are all translations of the same post/page. Post/page translation is optional; some posts/pages may not be defined for all languages. The language of the first translation entered for a post/page is noted as the "source language".

Taxonomy terms can also have one or more translations, which are also linked. The linkage lets us know that "Accesorio Categoría" (Spanish), "Catégorie Attachement" (French) and "Attachment Category" (English) are all translations of the same term. Term translation is optional; some terms may not be defined for all languages. The language of the first translation entered for a term is noted as the "source language".

When an item is uploaded to the Media Library it is assigned to the current language (note: avoid uploading items when you are in "All Languages"/"Show all languages" mode; bad things happen). WPML provides an option to duplicate the new item in all active languages; Polylang does not. MLA makes it easy to add translations to additional languages with the Translations column on the Media/Assistant submenu table. For Polylang, MLA provides Quick Translate and Bulk Translate actions as well.

Assigning language-specific terms to items with multiple translations can be complex. MLA's Term Assignment logic assures that every term you assign on any of the editing screens (Media/Add New Bulk Edit, Media/Edit, Media/Assistant Quick Edit and Bulk Edit, Media Manager ATTACHMENT DETAILS pane) will be matched to the language of each item and translation. MLA's Term Synchronization logic ensures that changes made in one translation are replicated to all other translations that have an equivalent language-specific term.

Shortcode Support

The [mla_gallery] shortcode selects items using the WordPress WP_Query class. Both WPML and Polylang use the hooks provided by WP_Query to return items in the current language. If you use taxonomy parameters in your shortcode you must make sure that the term name, slug or other value is in the same language as the post/page in which it is embedded. This is easily done when the post/page content is translated from one language to another.

The [mla_tag_cloud] shortcode selects terms using the WordPress wpdb class. MLA adds language qualifiers to the database queries that compose the cloud so all terms displated are appropriate for the current language. No special coding or shortcode modification is required.

Media/Assistant submenu table

Two columns are added to the table when WPML or Polylang is active:

  • Language - displays the language of the item. This column is only present when "All languages/Show all languages" is selected in the admin toolbar at the top of the screen.
  • "Translations" - displays the translation status of the item in all active languages. The column header displays the flag icon for the language. The column content will have a checkmark icon for the item's language, a pencil icon for an existing translation or a plus icon for a translation that does not exist. You can click any icon to go directly to the Media/Edit Media screen for that translation. If you click a plus icon, a new translation will be created and initialized with content and terms from the current item and you will go to the Media/Edit Media screen for the new translation.

When Polylang is active, several additional features are available:

  • A Language dropdown control is added to the Quick Edit and Bulk Edit areas. You can change the language of one or more items by selecting a new value in the dropdown and clicking Update. The new language must not have an exising translation; if a translation already exists the change will be ignored.
  • Translation status links are added to the Quick Edit area, just below the Language dropdown control. If you click one of the pencil/plus translation status links, a new Quick Edit area will open for the translation you selected. A new translation is created if you click a plus status icon.
  • A Quick Translate rollover action can be added to each item (the default option setting is "unchecked"). If you activate this option, when you click the "Quick Translate" rollover action for an item the Quick Translate area opens, showing the Language dropdown control and the translation status links. From there, click "Set Language" to change the language assigned to the item or click one of the pencil/plus translation status links. A new Quick Edit area will open for the translation you selected. A new translation is created if you click a plus status icon.
  • A Translate action is added to the Bulk Actions dropdown control. If you click the box next to one or more items, select Translate in the Bulk Actions dropdown and click Apply, the Bulk Translate area will open. The center column contains a checkbox for each active language and an "All Languages" checkbox. Check the box(es) for the languages you want and then click "Bulk Translate". The Media/Assistant submenu table will be refreshed to display only the items you selected in the language(s) you selected. Existing translations will be displayed, and new translations will be created as needed so every item has a translation in every language selected.

Term Management

Taxonomy terms are language-specific, and making sure the right terms are assigned to all items and translations can be a challenge. Terms can change when an item is updated in any of five ways:

  1. Individual edit - this is the full-screen Media/Edit Media submenu provided by WordPress. Taxonomies are displayed and updated in meta boxes along the right side of the screen. When "Update" is clicked whatever terms have been selected/entered are assigned to the item; they replace any old assignments.
  2. Media Manager Modal Window – this is the popup window provided by WordPress' "Add Media" and "Select Featured Image" features. Taxonomies are displayed and updated in the ATTACHMENT DETAILS meta boxes along the right side of the window. Whatever terms are selected/entered here are assigned to the item; they replace any old assignments.
  3. Quick Edit - this is a row-level action on the Media/Assistant screen. When "Update" is clicked whatever terms have been selected/entered are assigned to the item; they replace any old assignments.
  4. Bulk edit - this is a bulk action on the Media/Assistant screen, and is also available on the Media/Upload New Media screen. In the Bulk Edit area, terms can be added or removed or all terms can be replaced. The bulk edit can be applied to multiple item translations in one or more languages.
  5. IPTC/EXIF Metadata Mapping - this is done by defining rules in the "Taxonomy term mapping" section of the IPTC & EXIF Processing Options. The mapping rules can be run when new items are added to the Media Library, from the Settings/Media Library Assistant IPTC/EXIF tab, from the Media/Assistant Bulk Edit area or from the Media/Edit Media submenu screen.

When terms change in any of the above ways there are two tasks that require rules:

  1. How should language-specific terms be assigned to items selected? This is "Term Assignment".
  2. How should terms assigned to one translation of an item be used to update other translations of the same item? This is "Term Synchronization".

When new terms are added during IPTC/EXIF taxonomy term mapping a third task is required; should new terms be added only to the current language or should they be made available in all languages? This is "Term Mapping Replication".

Term Assignment

When a specific language is selected only the item translations for that language are shown, and only the terms for that language are displayed (except for a Polylang bug that shows all languages in the "auto-complete" list for flat taxonomies). When "All Languages"/"Show all languages" is selected the terms for all languages are displayed even if they cannot be assigned to an item. For example, a Spanish term may appear in the list be cannot be assigned to an English item translations.

For individual edit and quick edit updates the rule is simple:

  1. For all terms selected/entered, find the equivalent term in the language of the item translation. Assign the equivalent (language-specific) term if one exists. If no equivalent term exists, ignore the selected/entered term. Assign all equivalent terms to the item translation, replacing any previous terms.

For bulk edit updates the rule depends on which action (add, remove, replace) has been selected. Each of the item translations in the bulk edit list is updated by these rules:

  1. Add: For all terms selected/entered, find the equivalent term in the language of the item translation. Assign the equivalent (language-specific) term if one exists. If the equivalent term exists, add it to the item translation.
  2. Remove: For all terms selected/entered, find the equivalent term in the language of the item translation. Assign the equivalent (language-specific) term if one exists. If the equivalent term exists, remove it from the item translation.
  3. Replace: This is the tricky case. What should happen to terms already assigned to an item translation that have not been selected/entered for the update? In particular, what about terms that do not have translations to all languages? Should a "French-only" term be preserved?

The "Replace" answer is the same as the individual/quick edit answer. If the term is not selected/entered for the update it is discarded along with the other old assignments. After all, in "All Languages"/"Show all languages" mode the "French-only" term would have been in the list and could be selected if desired.

Term Synchronization

If you edit an item translation, for example to add or remove a term assignment, what should happen to the other translations of the same item? Term synchroniztion will add or remove the equivalent term in the other item translations if the equivalent term exists.

What about "untranslated" terms that do not have translations to all languages? Should an existing "French-only" (untranslated) term be preserved? It is, since there is no way to indicate that it should be removed.

Individual and quick edits are "replace" updates, and "replace" is an option for bulk edits as well. For term synchronization to preserve untranslated terms "replace" updates must be converted to separate "add" and "remove" updates that include only the changes made to the original item translation. For example, if these terms are defined:


  • Common-term-1-eng
  • Common-term-2-eng
  • English-only-term


  • Common-term-1-esp
  • Common-term-2-esp
  • Spanish-only-term

And these term assignments exist:

English Translation

  • Common-term-1-eng
  • English-only-term

Spanish Translation

  • Common-term-1-esp
  • Spanish-only-term

Then synchronization handles common editing actions as follows:

  1. If you edit the English Translation and add "Common-term-2-eng", synchronization will add "Common-term-2-esp" to the Spanish Translation.
  2. If you edit the English Translation and remove "Common-term-1-eng", synchronization will remove "Common-term-1-esp" from the Spanish Translation.
  3. If you edit the English Translation and remove "English-only-term", nothing will happen to the Spanish Translation.

Term Mapping Replication

When rules are defined in the IPTC/EXIF "Taxonomy term mapping section" they extract values (e.g., "IPTC 2#025 Keywords") from image metadata and use them to assign terms to the Media Library item(s). If the metadata value matches an existing term in the item's language it is assigned to the item. If the term already exists for any other active language it is not assigned to the item. If the term does not exist in any of the active languages, i.e., it is an entirely new term, a decision is required. The "Term Mapping Replication" option controls the decision:

  • When Replication is active, the term is created in the current language and then copied to every other active language as a translation of the term in the current language.
  • When Replication is not active, the term is created in the current language only. It is not copied to any other active language and will not be assigned to items in any language other than the current language.

If you use Replication to automatically create terms in non-current languages they will be created with the same text value as the source term in the current language. You can always go to the taxonomy edit page and change the source text to an appropriate value for the other language(s). If you do not use Replication you can always go to the taxonomy edit page and add translations with an appropriate value for the other language(s).

Thumbnail Substitution Support, mla_viewer

NOTE: Google has discontinued the File Viewer support for thumbnail images. This solution supports dynamic thumbnail image generation for PDF and Postscript documents on your site's server. You can also assign a "Featured Image" to any Media Library item. For non-image items such as Microsoft Office documents the featured image will replace the MIME-type icon or document title in an [mla_gallery] display. Simply go to the Media/Edit Media screen, scroll down to the "Featured Image" meta box and select an image as you would for a post or page.

The dynamic thumbnail image generation for PDF and Postscript documents uses the PHP Imagick class, which requires ImageMagick and Ghostscript to be installed on your server. If you need help installing them, look at this PDF Thumbnails support topic. If you don't have them on your server you can still use the Featured Image support to supply thumbnails for your non-image items.

Ten [mla_gallery] parameters provide an easy way to simulate thumbnail images for the non-image file types.

  • mla_viewer - must be "true" or "single" to enable thumbnail substitution. Use "true" unless you experience generation failures due to memory limitations on your server. Use "single" to generate one thumbnail at a time, which may be slower but requires less memory.
  • mla_viewer_extensions - a comma-delimited list of the file extensions to be processed; the default is "ai,eps,pdf,ps" (do not include the dot (".") preceding the file extension). You may add or remove extensions (when support for additional types becomes available).
  • mla_viewer_limit - the upper limit in megabytes (default none) on the size of the file to be processed. You can set this to avoid processing large documents if performance becomes an issue.
  • mla_viewer_width - the maxinum width in pixels (default "150") of the thumbnail image. The height (unless also specified) will be adjusted to maintain the page proportions.
  • mla_viewer_height - the maxinum width in pixels (default "0") of the thumbnail image. The width (unless also specified) will be adjusted to maintain the page proportions.
  • mla_viewer_best_fit - retain page proportions (default "false") when both height and width are explicitly stated. If "false", the image will be stretched as required to exactly fit the height and width. If "true", the image will be reduced in size to fit within the bounds, but proportions will be preserved. For example, a typical page is 612 pixels wide and 792 pixels tall. If you set width and height to 300 and set best_fit to true, the thumbnail will be reduced to 231 pixels wide by 300 pixels tall.
  • mla_viewer_page - the page number (default "1") to be used for the thumbnail image. If the page does not exist for a particular document the first page will be used instead.
  • mla_viewer_resolution - the pixels/inch resolution (default 72) of the page before reduction. If you set this to a higher number, such as 300, you will improve thumbnail quality at the expense of additional processing time.
  • mla_viewer_quality - the compression quality (default 90) of the final page. You can set this to a value between 1 and 100 to get smaller files at the expense of image quality; 1 is smallest/worst and 100 is largest/best.
  • mla_viewer_type - the MIME type (default image/jpeg) of the final thumbnail. You can, for example, set this to "image/png" to retain a transparent background instead of the white jpeg background.

When this feature is active, gallery items for which WordPress can generate a thumbnail image are not altered. If WordPress generation fails, the "Featured Image" will be used, if one is specified for the item. If the item does not have a Featured Image, supported file/MIME types (PDF for now) will have a gallery thumbnail generated dynamically. If all else fails, the thumbnail is replaced by an "img" html tag whose "src" attribute contains a url reference to the appropriate icon for the file/MIME type.

Four options in the Settings/Media Library Assistant MLA Gallery tab allow control over mla_viewer operation:

  • Enable thumbnail substitution
    Check this option to allow the "mla_viewer" to generate thumbnail images for PDF documents. Thumbnails are generated dynamically, each time the item appears in an [mla_gallery] display.
  • Enable Featured Images
    Check this option to extend Featured Image support to all Media Library items. The Featured Image can be used as a thumbnail image for the item in an [mla_gallery] display.
  • Enable explicit Ghostscript check
    Check this option to enable the explicit check for Ghostscript support required for thumbnail generation. If your Ghostscript software is in a non-standard location, unchecking this option bypasses the check. Bad things can happen if Ghostscript is missing but ImageMagick is present, so leave this option checked unless you know it is safe to turn it off.
  • Ghostscript path
    If your Ghostscript software is in a non-standard location, enter the full path and name of the executable here. The value you enter will be used as-is and the search for Ghostscript in the usual locations will be bypassed.

Field-level Substitution Parameters

Field-level substitution parameters let you access query arguments, custom fields, taxonomy terms and attachment metadata for display in an MLA gallery or in an MLA tag cloud. You can also use them in IPTC/EXIF or Custom Field mapping rules. For field-level parameters, the value you code within the surrounding the ('[+' and '+]' or '{+' and '+}') delimiters has three parts; the prefix, the field name (or template content) and, if desired, an option/format value.

Prefix values

There are ten prefix values for field-level parameters.

  • request - The parameters defined in the $_REQUEST array; the "query strings" sent from the browser.
  • query - The parameters defined in the [mla_gallery] shortcode.
  • custom - WordPress Custom Fields, which you can define and populate on the Edit Media screen or map from various sources on the Settings/Media Library Assistant Custom and IPTC/EXIF tabs.
  • terms - WordPress Category, tag or custom taxonomy terms.
  • meta - WordPress att

Requires: 3.5.0 or higher
Compatible up to: 4.5.3
Last Updated: 1 month ago
Active Installs: 30,000+


4.8 out of 5 stars


30 of 41 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

1 person says it works.
0 people say it's broken.

0,1,0 100,1,1
100,1,1 100,4,4 100,2,2 100,1,1 100,1,1
100,2,2 100,1,1 100,1,1 100,2,2 100,1,1
0,1,0 100,3,3
100,2,2 50,2,1
100,2,2 100,1,1
100,1,1 100,3,3
100,2,2 0,1,0
100,2,2 100,2,2 0,1,0
100,1,1 100,1,1
100,1,1 100,3,3
100,1,1 67,3,2
80,5,4 100,1,1
100,1,1 100,1,1
50,2,1 100,1,1