Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question. File Size and Image Dimensions are not stored in the WordPress database tables, but you can define a Custom Field to hold and display these on the Media/Assistant admin submenu table. You can find more information in the “Custom Field and Attachment Metadata Processing Options” section of the Settings/Media Library Assistant Documentation tab. You can find a complete list of the data sources available to you in the “Field-level data sources” section of the Documentation. You can use a Content Template to compose a value from several data sources, literal string and other material.

    For your File Size display you will probably want to alter the displayed text to show kilo- or mega-byte values, not just raw numbers. The instructions below allow for that. You can find a similar example in this earlier support topic:

    Trouble Adding Custom Fields

    For File Size, then, the steps are:

    • Navigate to the Settings/Media Library Assistant “Custom Fields” tab.
    • Make sure the “Enable custom field mapping when adding new media” box is checked. If not, check the box and click “Save Changes”.
    • Scroll down to the “Add New Custom Field Rule” area below the “Enable” checkboxes.
    • Under the “Name” dropdown control, click “Enter new field” to create a new custom field.
    • In the “Name” text box, give your field a name, e.g., “File Size”.
    • From the Data Source dropdown list, select “- Template (see below) -”.
    • In the “Meta/Template” text box, enter [+file_size,kbmb+].
    • Click the “MLA Column” check box if you want to make the field available in the Media/Assistant submenu table. You can also click the “Quick Edit” and “Bulk Edit” check boxes to make the field available in the Media/Assistant submenu table Quick Edit and Bulk Edit areas if that’s useful for you.
    • In the “Existing Text” dropdown list, select “Replace”.
    • In the “Format” dropdown list, select “Native”.
    • In the “Option:” dropdown list, select “Text”.
    • Click the “Delete NULL Values” checkbox.
    • Leave the “Status” set to “Active” so the rule will be executed for future additions to the Media Library.
    • Click the “Add Rule” button to save your work.

    Once the rule is created you must execute it to create the “File Size” value for the items already in your Media Library:

    • Find the “File Size” (or your chosen field name) in the table of rules on the right-hand side of the screen. If you don’t see your new rule, type the name you gave it in the search box above the table and click “Search Rules”.
    • Hover your mouse in the “Name” column and click the “Execute” rollover action.
    • Wait for the mapping process to complete.

    If you don’t see the “File Size” column in the Media/Assistant submenu table pull down the “Screen Options” area and make sure that “File Size” is listed and the box next to it is checked.

    For image dimensions the rule is a bit simpler:

    • In the “Name” text box, give your field a name, e.g., “Dimensions”.
    • From the Data Source dropdown list, select “dimensions”.
    • Leave the “Meta/Template” text boxempty.

    The rest of the steps are the same for both columns.

    I hope that gets you the results you seek. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above process. Thanks for your interest in the plugin.

    Thread Starter quasarwpg

    (@quasarwpg)

    Thank you! Now I can easily see the image dimensions for all the thousands of images in the library without having to click on each and every one. It was so tedious to try and verify the image dimensions of files other people are uploading until now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image file size, image dimensions’ is closed to new replies.