• The function the_post_thumbnail() lets you set attributes like alt and title but does not load the its actual value being set in media library.

    One of the obvious to solve this is to use get_post_meta() that requests to database. Which is very costly, having to request again for EACH item that has just been fetched.

    Is there any other way to do it with such drawback? It would be helpful and logical to allow loading metadata of all media included in post when making query.

  • The topic ‘Include Featured Image's Attributes in Posts Query’ is closed to new replies.