Setup

Prerequisites

  • Any Media Library Organizer Pro license

Overview

Settings are used to:

  • Define the default attributes to apply to newly uploaded files, when no attributes are specified
  • Determine the default Attachment Display Settings when inserting Media into Pages, Posts and Custom Post Types

In the WordPress Administration interface, click on Media Library Organizer > Settings
Media Library Organizer: Settings Menu

Enabling Defaults

Clicking the Defaults tab allows you to define the following settings:

Media Library Organizer: Defaults: Enable

For Default attributes to be applied to items uploaded to the Media Library, select Enabled from the Enabled option.

File Types

Once enabled, horizontal, secondary level file type tabs are then displayed:
Media Library Organizer: Defaults: Tabs

Clicking one of these file type tabs allows you to define one or more rulesets of default attributes to apply to files uploaded that match the given file type, which meet one or more specified rules.

For example, you might have two rulesets:

  1. The first ruleset, which categorizes the uploaded file to the Screenshot category whenever the filename contains the word screenshot
  2. A second ruleset, which applies a default title and alt text.

Other File Types

When uploading a file type that doesn’t have its own defaults, the Other tab provides default attributes that can be defined for these files.

Simple Defaults

Media Library Organizer: Defaults: Simple

To apply default attributes to all files uploaded for a given file type, complete the following:

  • Attributes
    • Alternative Text (Alt Tag): Assigns the specified Alternative Text (known as the Alt Tag) to Images files uploaded to the Media Library, where no Alt Tag is specified with the upload.
    • Title: Assigns the specified Title to Images files uploaded to the Media Library, where no Title is specified with the upload.
    • Caption: Assigns the specified Caption to Images files uploaded to the Media Library, where no Caption is specified with the upload.
    • Description: Assigns the specified Description to Images files uploaded to the Media Library, where no Description is specified with the upload.
    • Media Categories: Assigns the specified Media Categories to Image files uploaded to the Media Library, where no Media Categories were specified with the upload.
  • Rules
    • Set to Ignore Rules (just apply Attributes)

Dynamic Tags

For the Attributes, excluding Media Categories, you’ll see an option to insert tags.

Tags are dynamic, can be used in an attribute, and will be replaced by the file’s information – for example, using {file_dimensions} will output the Image Width and Height as part of the attribute’s value.

To insert a tag, either:

  • Select the tag from the dropdown list next to the Attribute field
    Media Library Organizer: Defaults: Tags: Dropdown
  • Start typing in the Attribute field, and click the applicable Tag from the list
    Media Library Organizer: Defaults: Tags: Autocomplete

There’s no limit to the number of Dynamic Tags that you use in an Attribute’s value.

The following Dynamic Tags are supported:

Name Tag Description Example
File Name {file_name} The File Name my-filename.jpg
File Name, Prettified {file_name_prettified} File Name, with underscores and dashes replaced by spaces. Each word then has its first character converted to uppercase. My Filename
File Extension {file_extension} File Extension jpg
File Type {file_type} File Type image
File Extension and Type {file_mime} File Extension and Type, separated by a forwardslash image/jpg
File Size {file_size} File Size, denoted with either kb, mb, gb appended to it 600kb
Image Width and Height {image_width_height} Image Width and Height, with the word pixels appended to it 1024 by 768 pixels
Image Width {image_width} Image Width, with the word pixels appended to it 1024 pixels
Image Height {image_height} Image Height, with the word pixels appended to it 768 pixels
Uploaded Date {uploaded_date} The date when the file was uploaded, using the Date format specified at WordPress Admin > Settings > General > Date Format July 29, 2020
Uploaded Time {uploaded_time} The date when the file was uploaded, using the Date format specified at WordPress Admin > Settings > General > Date Format 3:54pm
Uploaded Date and Time {uploaded_date_time} The date and time when the file was uploaded, using the Date format specified at WordPress Admin > Settings > General > Date Format July 29, 2020 3:54pm

Conditional Defaults

Media Library Organizer: Defaults: Conditional

To conditionally apply default attributes to all files uploaded for a given file type, based on the uploaded file’s criteria, complete the following:

  • Attributes
    • Alternative Text (Alt Tag): Assigns the specified Alternative Text (known as the Alt Tag) to Images files uploaded to the Media Library, where no Alt Tag is specified with the upload.
    • Title: Assigns the specified Title to Images files uploaded to the Media Library, where no Title is specified with the upload.
    • Caption: Assigns the specified Caption to Images files uploaded to the Media Library, where no Caption is specified with the upload.
    • Description: Assigns the specified Description to Images files uploaded to the Media Library, where no Description is specified with the upload.
    • Media Categories: Assigns the specified Media Categories to Image files uploaded to the Media Library, where no Media Categories were specified with the upload.
  • Rules
    • Set to either:
      • All Rules must Pass: All rules specified below must be met for the above attributes to be applied to the uploaded file type
      • Any Rule can Pass: Any single rule specified below must be met for the above attributes to be applied to the uploaded file type.  It doesn’t matter if some rules fail; only one has to pass for the attributes to be applied.
    • Rules:
      • Alternative Text (Alt Tag): Compare the value of the Alt Tag to the supplied value
      • Title: Compare the value of the Title to the supplied value
      • Caption: Compare the value of the Caption to the supplied value
      • Description: Compare the value of the Description to the supplied value
      • Filename: Compare the value of the filename to the supplied value
Defaults are applied last when uploading a file to the Media Library.  WordPress, or other third party Plugins, may populate certain attributes based on e.g. EXIF data, which is why the option to compare these attributes is available here.

Multiple Rulesets

More than one ruleset can be defined for each file type.  For example, you might have the following rulesets for images:

  1. The first ruleset, which categorizes the uploaded file to the Screenshot category whenever the filename contains the word screenshot
  2. A second ruleset, which defines the image title whenever the filename
  3. A third ruleset, which applies a default title and alt text.

Multiple rulesets are run through in order until a ruleset’s rules are met, so they are ideal for defining different rules and attributes depending on the files that are uploaded.

Add Ruleset

To define multiple rulesets:

  • Click the Add Ruleset button
    Media Library Organizer: Defaults: Add Ruleset Button
  • Define the Attributes and Rules as necessary

Delete Ruleset

To delete an existing ruleset:

  • Click the trash can button next to the number for the ruleset:
    Media Library Organizer: Defaults: Delete Ruleset Button
The first ruleset cannot be deleted.

Attachment Display Settings

Below the Defaults section, options are provided to define the default values to use for the Attachment Display Settings, which are displayed in the Media modal when inserting media or files into a Page, Post or Custom Post Type:
Media Library Organizer: Defaults Addon: Attachment Display Settings

For example, to define the default Attachment Display Settings for Images, complete the following:
[]

  • Alignment: The default alignment option to preselect in the above Media Modal when an Image is selected to be inserted into content.
  • Link To: The default link to option to preselect in the above Media Modal when an Image is selected to be inserted into content.
  • Size: The default image size option to preselect in the above Media Modal when an Image is selected to be inserted into content.

Save

Once you have made changes to the settings, click the Save button.

On screen confirmation will display to confirm that the settings have been updated.