I’m building an iPhone/Android mobile application that is supposed to be a mobile version of the existing Drupal 6 based website. Services module is used to provide web services interface to the app. I’m fetching the list of blog posts in JSON format via Drupal Views, where a blog post looks something like the this:
{"nid" => "12090",
"node_data_field_large_thumb_field_large_thumb_fid" => "16746",
"node_type" => "blog",
"node_revisions_body "=> "<p>Lorem ipsum dolor sit amet</p>",
"node_title" => "Lorem ipsum",
"node_created" => "1302883976"}
My problem is that I have no idea how to display the post’s thumbnail using its ID. Is there something in Drupal (maybe a module) that will allow me to use thumbnail ID in the following way:
<img src="http://www.example.com/thumbnail/300x200/16476">
Or perhaps some other established way of doing this? I have zero experience with Drupal.
When you specify the fields to output in Views, you can choose what to display for the image. you can chose the fid (which you probably did), or choose to displayt the path, or even the themed image.
In the Views admin, in the Fields box, click on the image field to show its properties, and then change the format.