I need help with the Envato API, I am stuck on how to load the thumbnail for search items, I am using CURL to load the items which works fine except on the search
my code is:
<img class="img-responsive" src="',$json_data['search'][$i]['thumbnail'],'" alt="',$json_data['search'][$i]['description'],'" />
I know the rest of my code is fine as the URL and file title displays but won’t show the image (the image source is blank)
I use a similar code for new items e.g.
<img class="img-responsive" src="',$json_data['new-files'][$i]['thumbnail'],'" alt="',$json_data['new-files'][$i]['item'],'" />
Any help is appreciated
The search query does not return the thumbnail, only id and title and url, not the thumbnail, see here: http://marketplace.envato.com/api/edge/search:themeforest,site-templates,xml.json
To get the thumbnail too, you’ll need to first extract from the search the item id, then use that id to make a new query to item details using: http://marketplace.envato.com/api/edge/item:1234.json where 1234 is your item id. This will indeed return the thumbnail.