Home Forums Front-end Issues Is there an ACF hook for when you edit an image?


Is there an ACF hook for when you edit an image?

  • When you click on the pencil icon, you get an option/window to “Edit Image” and a button that says “Update Image”. I’d like to be able to update the file name of an image using its title field (ex: if an image filename is “picture.jpg” I’d like to use the title “Yellow Flower” to update it to “yellow_flower.jpg”). I’m guessing that you have to use some hook for when you tap on the “Update Image” button but I haven’t found it online. Does one exist and if not how would I go on about doing this?

  • An answer to this would be great

  • Editing an image is part of WP core and not part of ACF. ACF just implements functionality that is already there. If there is a hook for after an image is edited then this hook would be found in WP.

    Just at a guess I would assume the WP “post_updated” hook or perhaps the more specific “save_post_{$post_type}” hook which would be “save_post_attachment” for images.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.