Home › Forums › General Issues › Set image alt text using ACF field › Reply To: Set image alt text using ACF field
Hi @fivehead
At a guess, you would need to run a hook on post publish/update.
The hook could then use the get_field value and update the alt.
You would need to get the image attachment ID and then you can use:
$image_alt = get_field('image_alt');
update_post_meta($attachment_id, '_wp_attachment_image_alt', $image_alt);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.