Recipe and User Images

Over the years, we have moved from hosting recipe images on our main webserver to photo services to Content Distribution Networks (CDN), to provide partners and consumers with the fastest and most reliable experience.

Another key design goal of ours is that once URLs are live in the field, we do not wish to break them. Between our legacy version 1 API and the new API, you'll likely see several different forms of URLs for photos, but the filenames are unique, and there's a single method to retrieve them all in various sizes.

Photo Resizer

We've built a photo redirector at https://bigoven-photoredirect-shadow.azurewebsites.net, and you can send it various images you receive and fetch the proper image. All PhotoUrl fields in the updated API2 version of our API now use this photo redirector. You can pass it parameters of the image size you'd like, and it'll return the closest image matching your request (without going over).

Let's look at a sample recipe record. Doing a search for Lasagna recipes (/recipes?any_kw=lasagna&pg=1&rpp=10), we might see this response:

{
  "ResultCount": 2969,
  "Results": [
    {
      "RecipeID": 1336994,
      "Title": "lowfat vegetable lasagna",
      "Cuisine": "",
      "Category": "",
      "Subcategory": "",
      "Microcategory": "",
      "StarRating": 0,
      "WebURL": "https://shadow.bigoven.com/recipe/lowfat-vegetable-lasagna/1336994",
      "ReviewCount": 0,
      "Poster": null,
      "IsPrivate": false,
      "Servings": 0,
      "CreationDate": "2015-11-28T20:18:11.193Z",
      "IsRecipeScan": false,
      "IsBookmark": true,
      "TotalTries": 1,
      "PhotoUrl": "https://bigoven-photoredirect-shadow.azurewebsites.net/recipe/hero/lowfat-vegetable-lasagna-1336994.jpg"
    } ... ]
}

The PhotoUrl https://bigoven-photoredirect-shadow.azurewebsites.net/recipe/hero/lowfat-vegetable-lasagna-1336994.jpg points to the original, fully sized image. To get a 64x64 image, just append ?h=64&w=64 onto that URL, like so:

https://bigoven-photoredirect-shadow.azurewebsites.net/recipe/hero/lowfat-vegetable-lasagna-1336994.jpg?h=64&w=64

The Photo redirector will return the closest square that matches your request, without going over. PhotoUrls come in various sizes: At present, these are 16x16, 36x36, 48x48, 64x64, 120x120, 128x128, 200x200, 256x256, 320x320, 480x480, 512x512, 640x640, 700x700, 960x960, 100x1000 and 1024x1024.

In some legacy cases, you may get a URL from the host images.bigoven.com, www.bigoven.com or mda.bigoven.com. Those will still return valid images, but to get the photo resizing to work, use the same filename, and use the pattern https://bigoven-photoredirect-shadow.azurewebsites.net/recipe/hero/{filename.jpg} to get your image.

Avatar Photos

Avatar photos for users are just like the above, except they follow the pattern:

https://bigoven-photoredirect-shadow.azurewebsites.net/avatar/{filename.jpg}

User avatar photo urls are similarly mapped to sizes by appending the h and w parameters; available sizes 16x16, 36x36x 48x48, 64x64, 120x120, 128x128, 200x200, 256x256, 320x320, and 480x480.

More Information

Please see our Swagger Documentation area for all API documentation, and links to tools to generate proxy libraries for your programming environment, including Ruby, Node.js, C#/ASP.NET, php, python and more.