Index and add an image to your collection. This method is used to populate your image collection. Images can be uploaded directly to the server or a URL where the image is located can be specified.
Note: only the image of the label and the filepath/filename string is stored in your WineEngine collection. Any metadata that you need to store about a label should be stored in your own database and accessed using the filepath as a key.
The WineEngine API can perform one add or delete operation at a time. Any extra requests submitted will be queued up for processing as slots become available.
For maximum performance images should be pre-scaled, as described under Image Limitations below. Thus, in some cases where you could use URLs, it may be better to do the download yourself, scale the image, and send it in the request. If you are using URLs, make sure that the image comes from a low latency server as the API will need to download them before indexing.
- Naming conflicts: Uploading an image with the same file path will result in the existing image being overwritten. This helps avoid duplicate entries.
- Image size: For optimal performance, images should be 1000 pixels in size in the smallest dimension. For example, 1800x1500 pixels is larger than required and it will take longer to transfer this file to your WineEngine server. It would be faster to resize this image to be 1200x1000 and then send it. Images smaller than 1000px may provide acceptable results, if you don’t have access to higher resolution versions. Do not scale up images.
- Image content: Some images may not contain enough detail to be indexed effectively. For example, images that are extremely small will not show up in search results.
- Image format: Accepted formats are JPEG, PNG, GIF (non-animated), BMP and TIFF files.
In addition to the Common parameters there are:
|image||An image file object that will be added to the collection.|
|filepath (optional)||A filepath under which the image file will be added to the collection. If not supplied, the API will use the name as specified in the filename parameter of a multipart HTTP request.|
curl https://wineengine.tineye.com/<company>/rest/add/ \ -F "email@example.com"
curl https://wineengine.tineye.com/<company>/rest/add/ \ -F "firstname.lastname@example.org" \ -F "filepath=image_1.jpg"