Home Forums Feature Requests Image field store and single page apps.


Image field store and single page apps.

  • As single page apps become more popular your guaranteed to see them crop up more regularly utilizing wordpress, and thus a need to for the availability of certain data structures.

    I’ve been working on a few backbone apps that are powered by wordpress and utilize a JSON api to retrieve my data.

    Ideally when I retrieve a post I would like all of it’s custom fields to be available and ready to use without any extra queries going back to the API. JSON API works great for this but htere is one problem.

    When I retrieve a post that has image fields the only thing that is stored in the database is the attachment ID. Forcing me to first query my post, detect the image field and then make a second query to the API to retrieve URL’s for my attachment.

    Is there anyway we can make the values stored in the database into serialized strings that contain both the ID and a list of the URLs, or at least the full size url?

Viewing 1 post (of 1 total)

The topic ‘Image field store and single page apps.’ is closed to new replies.