Support

Account

Home Forums ACF PRO add returned JSON as custom field value for image upload

Unread

add returned JSON as custom field value for image upload

  • i’ve got a weird one, and i’ve googled for a couple of hours now to find a hint or two but i keep hitting dead ends. i hope i’m missing something simple.

    i’m working on a site that uses a lot of large animated gifs within their articles and we’ve decided to use gfycat to convert and display those ginormous gifs to/as html5 video. the gfycat api is dead simple, you call an endpoint with your gif url at the end, like so

    http://upload.gfycat.com/transcode?fetchUrl=i.imgur.com/lKi99vn.gif

    and you’re returned a json object with the converted urls.

    what i’d like to do is add flexible content layout with a single image upload field. i’d like to be able to upload an animated gif, send the /uploads/year/month/filename url to gfycat, and store bits of the returned json object as custom fields.

    when i call the row within a template, i’ll use those bits to build <video> src elements.

    are there hooks and filters available for me run wp_remote_get, process the json, and store it?

Viewing 1 post (of 1 total)

The topic ‘add returned JSON as custom field value for image upload’ is closed to new replies.