Support

Account

Home Forums General Issues image iptc editing in admin via acf?

Helping

image iptc editing in admin via acf?

  • I have this idea. I would like to import an image into wordpress act field and that have that image field put the caption from iptc into a separate act field so that it can edited and then display donated site.

    right now i have it so that wp imports the image and then displays the iptc caption info on the page — but the problem seems to be if the image is used in another post then if the caption is edited of that post it changes all across the site.

    yes i could have the producer cut and paste but if there wee a way to automatically have it sucked into a act filed ot be edited even better.

    thx!

    seth

  • Hi Seth,

    Maybe I am thinking about this incorrectly… but… it seems to me that the caption *should* stay with the image, and *not* the post, yeah?

    What if you un-attach the image from the post, then the Caption remains, right?

    Wait.. now that I typed that out… I suppose what can be done is…

    1) Create an ACF field attached to Images…

    2) Make it read only (i.e. disable it using the acf/prepare_field filter). That way.. it *stays* with the image, but cannot be edited by anyone.

    Now… when you attach that same image to another Post… the data will carry over and stay consistent.

    This is the first time hearing of IPTC for me, but here are docs on how to parse the data with PHP.

    To attach the field to Images (so that it can be edited in the Media Library), choose ” ‘Attachment’ ‘is equal to’ ‘All image formats’ ” in the Location Rules when creating/editing the ACF Field Group.

    Now, I suspect you can use this filter to do you IPTC parsing work, and saving the data into your Custom field. It’s for “saving posts” but can be used for other data types too. I haven’t worked out precisely how to do this final part yet, but I am confident it’s doable. Let me know what you think.

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

The topic ‘image iptc editing in admin via acf?’ is closed to new replies.