Image alt, title, and caption: fetch from database rather than embed in post?
-
When an image is inserted into posts or pages, WordPress fetches (at publish time) the alt tag, title tag, and caption for that image from the media library. It embeds this information inside the mysql database entry containing the html for the new post. The database overhead per post view is thus one SQL lookup to fetch the post’s HTML, and no additional SQL lookups per image.
Is there any means by which I can make WordPress fetch the aforementioned metadata for each embedded image from the database? That is, I want WordPress to run an additional SQL lookup per image-attached-to-post to fetch that image’s metadata. The database overhead would be one SQL lookup per post, with an additional SQL lookup per image.
TLDR: Can WordPress be made to update image HTML attributes for images embedded in posts based on changes made to that image’s attributes in the media library?
- The topic ‘Image alt, title, and caption: fetch from database rather than embed in post?’ is closed to new replies.