Some clients have integrated UGC into their stock photography carousel that lives on product pages via our API. In the Earned Content Platform, you are able to specify a user photo that can be used as a "featured image". A featured image is a user photo that can be specified as the image that represents the product/property in the API response.
Note that when making a user image a featured image, it does not replace the stock photography of a given product, but simply gives you an option to use UGC to represent a product/property when building custom implementations.
Instructions
There are 2 parts to achieve the Alt-View functionality using our API:
First, set a Featured Image using the admin for a product stream
Second, traverse through the API to grab the "feature image" related to the specific product stream
Setting the Featured Image
The first step is to decide which image you would like to use as the featured image for a stream or streams you would like to leverage this feature for. To begin that process, you must first go to the Photorank admin and follow these steps:
Navigate to the Media tab and click on Streams
Find the stream and click on the stream card or search result.
In the overlay, slide the Manual Sort slider in the top left to ‘1’. Click on the image that you would like to use as the featured image, then click the green arrow icon in the bottom-left corner of the overlay. This will move the selected photo to the first position. Click the ‘Save’ button to save your changes.
Grabbing the Featured Image from the API
Once you set the featured photo in the Streams section, the featured image can be surfaced in the API response.
Please follow these instructions:
Make a call using our streams endpoint (reference documentation and construct a call like this:
http://photorankapi-a.akamaihd.net/streams/{stream_id}/media/media_position?tag_key{product_id}&auth_token={auth_token}&version=v2.2
Within the API response, look for the media embedded list. Within that list, the first occurring media is your featured image:
Within this media object, select the image resolution you wish to surface in the images parameter.




