Support » Plugin: Media Library Assistant » Get all the images which doesnt have alt text

  • Resolved arnonbenshahar

    (@arnonbenshahar)


    Hey,

    I want to retrieve all the images in my site which doesn’t have an alt text.

    Next if it is possible, I want for all the images without alt text to add as an alt text the title of the image.

    Thanks for the help

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

    (@dglingren)

    Thanks for an interesting two-part question. I am happy to show how MLA can help with managing your ALT Text values.

    You wrote “I want to retrieve all the images in my site which doesn’t have an alt text.” You can enhance MLA’s Media/Assistant admin submenu to find all the items that do not have an ALT Text value in either of two ways.

    First, you can simply sort the table display on the ALT Text column. If ALT Text isn’t shown in the table, pull down the Screen Options area and check the box to the left of “ALT Text”. Then, click on the column header to sort the display by that column. The first click will start with the items that DO have a value; click twice to start with the items having no value.

    Second, you can define a custom table view to filter the display, showing only the items lacking a value:

    1. Navigate to the Settings/Media Library Assistant “Views” tab.
    2. Scroll down to the “Add New View” section on the left-hand side of the page.
    3. Enter “no-alt-text” in the “Slug” text box.
    4. Enter something like “No ALT Text” in the “Singular Label” and “Plural Label” text boxes.
    5. Enter custom:_wp_attachment_image_alt,null in the Specification text box.
    6. Uncheck the “Post MIME Type” box.
    7. Check the “Table View” box to add the View to the Media/Assistant submenu.
    8. Enter “0” in the Menu Order text box.
    9. Enter a Description if you want one.
    10. Scroll to the bottom of the screen and click “Add View” to save your settings.
    11. Navigate to the Media/Assistant submenu.
    12. Click “No ALT Text” in the list of views under the screen title to filter the table.

    You wrote “I want for all the images without alt text to add as an alt text the title of the image.” You can do this on a one-time basis using MLA’s Bulk Edit action in the Media/Assistant submenu:

    1. Navigate to the Media/Assistant admin screen.
    2. Check the box to the left of each item you want to edit.
    3. Pull down the “Bulk Actions” control and select “Edit”.
    4. Click “Apply” to open the Bulk Edit Area.
    5. Make the changes you want to apply to the selected items. For example, enter template:[+post_title+] in the ALT Text text box in the right-hand column. This copies the item Title to the ALT Text value.
    6. Click “Update” in the lower-right corner of the Bulk Edit area to apply your changes.
    7. When the operation is complete, click “Refresh” to see the results.

    Using the custom table view and the Bulk Edit area should make the job easy. You can also define a mapping rule perform the update:

    1. Go to the Settings/Media Library Assistant IPTC/EXIF tab.
    2. If you want to apply the rule to new items as they are uploaded (recommended), check the “Enable IPTC/EXIF Mapping when adding new media” and “Enable IPTC/EXIF Mapping when updating media metadata” boxes.
    3. Scroll down to the “Standard field mapping” section.
    4. Locate the “ALT Text” rule entry and click the “Edit” rollover action.
    5. In the “IPTC Value” dropdown control leave the default “- None (select a value) -” in place.
    6. In the “EXIF/Template Value” text box enter template:[+post_title+]
    7. In the “Priority” dropdown, select “EXIF”.
    8. In the “Existing Text” dropdown, select “Keep”. This will retain any existing values.
    9. Scroll down to the bottom of the screen and click “Save Changes”.

    Once you define a rule you can apply it to a single image, multiple images or all images:

    • To map a single image, go to the Media/Assistant submenu and click the thumbnail of the image you want (or click the “Edit” rollover action) to get the Media/Edit Media screen. You can click the “Map IPTC/EXIF metadata” link to run your rules on this image, then scroll down and look at the “Alternative Text” meta box to inspect the results.
    • To map two or more images, go to the Media/Assistant submenu and click the checkbox next to the images you want. Then, select “Edit” from the “Bulk Actions” dropdown above the checkboxes and click “Apply” to open the Bulk Edit area. Click the “Map IPTC/EXIF metadata” button to run your rules on the selected images.
    • To map all of your images, stay on the Settings/Media Library Assistant IPTC/EXIF tab and click the “Execute” rollover action for the ALT Text rule. This may take a while.
    • The Settings/Media Library Assistant IPTC/EXIF tab also has an “Execute” Bulk Action you can use to apply several rules at once, and an “Execute All Rules” button to run all of the rules against all of your items.

    I hope that gives you what you need to accomplish your task. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the aabove suggestions. Thanks for your interest in the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Get all the images which doesnt have alt text’ is closed to new replies.