How Will Image Attributes Pro Behave When Same Image Is Used On Multiple Posts/Products

WordPress stores image attributes namely Image Title, Image Alt Text and Image Caption in two locations.

One set of image attributes is stored along with the image, which can be read from the media library.

Image Attributes In Media Library

Image Attributes are also embedded within the post content.

Image Attributes Embedded

How Image Attributes Pro behaves will depend on whether you use image filename or post title for image attributes.

If you choose to use image filename for the image attributes, then Image Attributes Pro will use the image filename everywhere. No matter how many times the image is used, it’s filename is always the same. Hence it will be same everywhere.

However, if you choose to use the “Post Title” (also applies to Product Title for WooCommerce) things are a bit different. Let’s consider a few cases.

Image Attributes are set to Post Title, but the image is used only once

This is easy. Then the title of the post or product to which the image is uploaded will be used for the image both in the media library and within the post content.

What if Image Attributes are set to Post Title and the image is used multiple times?

WordPress attaches images to a specific post and this is displayed in the Media Library. Usually this will be post to which the image was originally uploaded to.

Images can also be “Unattached” which typically happens when images are uploaded to the Media Library directly or imported using third party plugins.

Media Library With Images That Are Attached And Unattached
Media Library (list view) showing Attached and Unattached images.

For images that are attached to a post or product:

  • The image attributes in the media library will be the post title of the post or product to which it is attached to.
  • The embedded image attributes in each of the post will be the title of that specific post or product that uses the image.

For images that are Unattached to a post or product:

  • A search is made to see if the image is used as a featured image on any post / product. If a match is found, then the image will have the title of that post / product.
  • If no match is found in the previous search, then a search is done to see if the image is used in the Product Gallery for any WooCommerce product. If a match is found, then the image will have the title of that product.
  • If no match is found in the previous search, then a search is done to see if the image is used within the HTML of any page / product. If a match is found, then the image will have the title of that page / product.
  • If no match is found in all these searches, then the image filename will be used as fallback.
  • The image attributes embedded within the post or product will still be the title of that specific post or product.

Still got questions? Please do not hesitate to get in touch.

Was this article helpful?
Yes, thanks! 👍Not really 👎