{"id":3689,"date":"2020-01-02T15:47:00","date_gmt":"2020-01-02T10:17:00","guid":{"rendered":"https:\/\/imageattributespro.com\/?p=3689"},"modified":"2023-04-26T16:51:16","modified_gmt":"2023-04-26T11:21:16","slug":"use-image-caption-as-alt-text","status":"publish","type":"post","link":"https:\/\/imageattributespro.com\/use-image-caption-as-alt-text\/","title":{"rendered":"Use Image Caption As Alt Text Automatically"},"content":{"rendered":"\n

If are in the habit of adding a caption for your images and you wish to use the image caption as alt text, then Image Attributes Pro is here to help.<\/p>\n\n\n\n

Starting with Image Attributes Pro version 4.3<\/code> you can use the %imagecaption%<\/code> custom attribute tag<\/a> to copy your image caption and use them as alt text for your images. <\/p>\n\n\n\n

This guide will show you how to configure Image Attributes Pro to automatically use captions as alt text for all new images you upload. <\/p>\n\n\n\n

But that’s not all! With the Bulk Updater<\/code> tool, you can easily convert existing captions in your Media Library to alt text for all images on your site.<\/p>\n\n\n\n

Step 1: Disable auto generation of image caption In General Settings<\/h2>\n\n\n\n

If captions are auto generated during image upload, that is saved in the Media Library and the typed in caption will only be saved in the Post HTML (what’s the difference?<\/a>). <\/p>\n\n\n\n

Disabling automatic creation of caption will allow Image Attributes Pro to save the caption you type in at the time of image upload to the Media Library.<\/p>\n\n\n\n

The caption in the Media Library is what that ends up as the image alt text.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Step 2: Configure Image Alt Text Settings<\/h2>\n\n\n\n

Switch to the Advanced<\/code> tab of Image Attributes Pro settings and add %imagecaption%<\/code> as the image alt text. This can be added manually or by clicking the button.<\/p>\n\n\n\n

\"Step<\/figure>\n\n\n\n

Step 3: Enable automatic updates on publish<\/h2>\n\n\n\n

Scroll down to Miscellaneous Settings<\/code> in the Advanced<\/code> tab and enable, Update image attributes on post publish or update.<\/code><\/p>\n\n\n\n

Once enabled, when a post is published or updated, the image attributes of all images associated with the post will be updated<\/a> as per the settings of Image Attributes Pro.<\/p>\n\n\n\n

This will ensure that the image alt text is added when the post is published.<\/p>\n\n\n\n

\"Update<\/figure>\n\n\n\n

Step 4: Configure Image Alt Text Settings for the Bulk Updater<\/h2>\n\n\n\n

Set the Bulk Updater to overwrite any existing image alt text. When the post is published, these settings will be used to update the alt text.<\/p>\n\n\n\n

\"Step<\/figure>\n\n\n\n

Save the settings<\/strong>, head over to a post, add an image, add a caption and hit publish.<\/p>\n\n\n\n

The alt text will be empty before the post is published.<\/p>\n\n\n\n

\"Alt<\/figure>\n\n\n\n

Once the post is published, alt text will be added. In Gutenberg, just refresh the editor see the update.<\/p>\n\n\n\n

\"Alt<\/figure>\n\n\n\n

Step 5: Run Bulk Updater to copy caption to alt text for all existing images<\/h2>\n\n\n\n

Switch to the Bulk Updater<\/code> tab in Image Attributes Pro and click Run Bulk Updater<\/code>. <\/p>\n\n\n\n

\"Run<\/figure>\n\n\n\n

Alternatively you can also update specific images or posts using the\u00a0Bulk Actions<\/a> available in Image Attributes Pro.<\/p>\n\n\n\n

Please remember to take a database backup before proceeding. Also take advantage of the\u00a0Test Bulk Updater<\/code>\u00a0button to update just one image at a time and confirm the results before proceeding.<\/p>\n\n\n\n

That’s it, I hope that was not too complicated. Feel free to reach out<\/a> if you have questions and help will be on it’s way. <\/p>\n","protected":false},"excerpt":{"rendered":"

If are in the habit of adding a caption for your images and you wish to use the image caption as alt text, then Image Attributes Pro is here to help. Starting with Image Attributes Pro version 4.3 you can use the %imagecaption% custom attribute tag to copy your image caption and use them as […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"_links":{"self":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/posts\/3689"}],"collection":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/comments?post=3689"}],"version-history":[{"count":2,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/posts\/3689\/revisions"}],"predecessor-version":[{"id":3697,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/posts\/3689\/revisions\/3697"}],"wp:attachment":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/media?parent=3689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/categories?post=3689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/tags?post=3689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}