{"id":676,"date":"2019-02-17T11:34:42","date_gmt":"2019-02-17T06:04:42","guid":{"rendered":"https:\/\/imageattributespro.com\/?p=676"},"modified":"2023-04-24T21:43:40","modified_gmt":"2023-04-24T16:13:40","slug":"copy-image-attributes-media-library-to-posts","status":"publish","type":"post","link":"https:\/\/imageattributespro.com\/copy-image-attributes-media-library-to-posts\/","title":{"rendered":"Copy Image Title and Alt Text From Media Library to Posts"},"content":{"rendered":"
Say you have a website where you have manually updated the image attributes of some of the images in the media library. Now you want to copy them to the posts (or products) where the images are used.<\/p>
If you haven’t noticed already, updating image attributes in the media library does not update them in the posts automatically. WordPress also stores a copy of the image attributes in the post or product HTML.<\/p>
If you are not sure what that means, please read: Understanding How WordPress Store Image Attributes<\/a><\/p> Luckily, Image Attributes Pro<\/a> can help you with this and copy image attributes (alt text and image title for now) from the media library to all posts (and products<\/a> and other post types) in bulk.<\/p> Image Attributes Pro To copy image attributes to posts:<\/strong><\/p> Say you updated some of the images in posts with an Image Title and \/ or an Alt Text when the image was added to the post and you do not want them to be overwritten again. <\/p> Image Attributes Pro got you covered, refer screenshots below.<\/p> Please remember to test the bulk updater using the Checkout Image Attributes Pro and the pricing plans<\/a>. If you have any more questions, please do not hesitate to get in touch<\/a>.<\/p>","protected":false},"excerpt":{"rendered":" Say you have a website where you have manually updated the image attributes of some of the images in the media library. Now you want to copy them to the posts (or products) where the images are used. If you haven’t noticed already, updating image attributes in the media library does not update them in […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"categories":[31],"tags":[],"class_list":["post-676","post","type-post","status-publish","format-standard","hentry","category-how-to"],"_links":{"self":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/posts\/676","targetHints":{"allow":["GET"]}}],"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=676"}],"version-history":[{"count":19,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":3624,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/posts\/676\/revisions\/3624"}],"wp:attachment":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/media?parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/categories?post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/tags?post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Copy Image Attributes From Media Library To Posts In Bulk<\/h2>
version 4.3<\/code> and later ships with a custom attribute tag<\/a>
%copymedialibrary%<\/code>. This tag can be used as custom attribute as you can see in the screenshot below.<\/p>
<\/figure>
%copymedialibrary%<\/code> as the custom attribute in
Advanced<\/code> settings >
Image Title Settings<\/code> and
Image Alt Text Settings<\/code>.<\/li>\n\n
Bulk Updater Settings<\/code> tab and for Image Title and Image Alt Text Settings, configure the
Handling existing attributes<\/code>` setting. You can choose to overwrite existing attributes or update only missing attributes. (Refer screenshots below.)<\/li>\n\n
Bulk Udpdater<\/code> tab and run the bulk updater.<\/li><\/ul>
What if some posts already have custom Image Title and Alt Text?<\/h2>
<\/figure>
Test Bulk Updater<\/code> button to make sure the expected output is what you want. It’s also a good idea to take a complete database backup before doing anything in bulk.<\/p>
Sounds good. How do I get started?<\/h2>