Copy image attributes to post HTML while updating in Media Library.

WordPress stores image attributes in the Media Library and in the Post HTML. Updating image attributes in the Media Library does not update the attributes stored in the post HTML by default.

With Image Attributes Pro version 4.3 and later, you have the option to update the image title and image alt text in the post (or product) HTML when you update attributes in the Media Library.

You will find this setting in Image Attributes Pro settings > Advanced tab > Miscellaneous Settings as you can see below.

Copy Image Attributes To Post Html While Updating The Media Library

Once you enable this option, each time you update any image attribute in the Media Library, the image title and image alt text will be copied to the posts, pages or products where the image is used.

A list of posts where the image is used will be available in the Media Library meta box.

Here are few screenshots to help you understand how this feature works.

Updating Media Library With New Image Attributes
Updating image attributes in the Media Library. The meta box shows where the image is used.
Image Attributes Copied To The Post Html
Image title and alt text is copied over to the product HTML while updating Media Library.

Few things to note:

  • The image attributes are copied over only when you update the Media Library manually. When Media Library is updated programmatically, the attributes are not copied over.
  • The image attributes will be used just as they are in the Media Library. Any attribute settings you have in the Advanced tab of Image Attributes Pro will be overridden.
  • The Bulk Updater must be configured to Update in the Post HTML in the Bulk Updater Settings of Image Attributes Pro. Otherwise, the attributes will not be copied over.
  • If bulk updater is set to Preserve existing attributes and add missing attributes only, then image attributes are only copied over if the corresponding attributes are empty in the post HTML.
Was this article helpful?
Yes, thanks! 👍Not really 👎