Add alt tags in the Media Library table listing

Why aren't alt tags already included?

The Media Library page is one of a handful of view listings in your site that isn't locked down, which means users with the Site Builder role can modify the view for a custom display. As a result of this editable status, the SiteFarm team prefers to avoid making platform-wide changes to this view unless it involves a bug or security issue as any changes made could overwrite your customizations.

Who can make this edit?

Any user with the Site Manager and Site Builder roles can make this edit to the Media Library view.

How to include an Alt Tag column in your Media Library table view

  1. Using your admin panel, navigate to Shortcuts » Media or Manage » Content » Media tab.
  2. Locate the + Add media button and look just above to confirm you're on the Table view, or click on this text if your view is on a different option.
  3. Hover your mouse to the right of the search/filter options until you see a pen icon appear on the far righthand side of the screen. Click on the pen icon and, from its submenu, click Edit view.
  4. In the Fields section, click the Add button.
  5. Type 'image' in the search field.

    Menu interface displaying file management options with highlighted selection.
  6. Check the Image field checkbox and click the Add and configure fields button.
  7. A pop-up will display titled "Configure aggregation settings for field Media: Image". Click the Apply and continue button.
  8. The pop-up will update and now display the titles: Configure field 2 of 2: Media: Image
    Appears in: sf_image_media_type. 

    Settings for editing image metadata with labeled fields highlighted.

    Make the following configuration changes:

    • Label - Alt Tag
    • Column used for sorting -  alt
    • Formatter - URL to image
    • Expand the label titled "Rewrite results"
      • Check the box for "Override the output of this field with custom text"
      • In the textarea field that appears copy and paste in this information:
        {{ field_media_image__alt }}

        The specific token need for the overwrite output field, refer to documentation for details.
  9. Click the Apply button when finished.
  10. Return to the Fields section and notice that your Alt Tag addition is at the very end of the list. To change its position, click on the downward arrow next to the Add button and click Rearrange.
  11. Locate Media: Image Alt Tag in the list, likely at the bottom, and drag and drop it into your preferred position for its display. when finished, click the Apply button.
  12. When you're returned to the view, scroll down to the preview section and confirm the Alt Tag column appears and is in your preferred position in the table listing. When satisfied, click the Save button to finish.