hook into completed image upload filter

WordPress’ media handling strikes me as scattered and inconsistent. I say that only to say that I can’t promise this will work in all cases. However, I think I’d use the add_attachment hook from wp_insert_attachment.

You will get a post ID, so you will have to …

  1. retrieve the image src with wp_get_attachment_imge_src,
    probably,
  2. retrieve the image itself and process it (not sure how you intend to
    do that),
  3. and save the extra data.

Leave a Comment