Skip to content

Instantly share code, notes, and snippets.

@justinanderson
Created August 12, 2013 19:47
Show Gist options
  • Select an option

  • Save justinanderson/6214444 to your computer and use it in GitHub Desktop.

Select an option

Save justinanderson/6214444 to your computer and use it in GitHub Desktop.
Shallower structure for News images. The square images have predefined dimensions and the size of the aspect_140 one can be deduced from the dimensions of the full image, so we should be able to get away with this flattened image structure.
# Shallower
{
"images": [
{
"caption": "Cross-section view of the proposed silicon carbide cladding...",
"credits": "Image courtesy of Mujid Kazimi and Youho Lee",
"primary": true,
"width": 346,
"height": 368,
"url": "http://web.mit.edu/newsoffice/images/article_images/20130725220853-1.jpg",
"aspect_140_url": "http://web.mit.edu/newsoffice/images/article_images/w140/20130725220853-1.jpg",
"square_76_url": "http://web.mit.edu/newsoffice/images/article_images/w76/20130725220853-1.png",
"square_152_url": "http://web.mit.edu/newsoffice/images/article_images/w152/20130725220853-1.png"
},
{
"caption": "A silicon carbide (SiC) sample is removed from a 1500 degree...",
"credits": "Image courtesy of Mujid Kazimi and Youho Lee",
"width": 368,
"height": 272,
"url": "http://web.mit.edu/newsoffice/images/article_images/20130725220853-0.png"
}
]
}
# Deeper
{
"images": [
{
"caption": "Cross-section view of the proposed silicon carbide cladding...",
"credits": "Image courtesy of Mujid Kazimi and Youho Lee",
"primary": true,
"representations": {
"76": {
"url": "http://web.mit.edu/newsoffice/images/article_images/w76/20130725220853-1.png"
},
"152": {
"url": "http://web.mit.edu/newsoffice/images/article_images/w152/20130725220853-1.png"
},
"small": {
"width": 131,
"height": 140,
"url": "http://web.mit.edu/newsoffice/images/article_images/w140/20130725220853-1.jpg"
},
"full": {
"width": 346,
"height": 368,
"url": "http://web.mit.edu/newsoffice/images/article_images/20130725220853-1.jpg"
}
}
},
{
"caption": "A silicon carbide (SiC) sample is removed from a 1500 degree C. furnace, where it demonstrated superior tolerance to oxidation with steam.",
"credits": "Image courtesy of Mujid Kazimi and Youho Lee",
"representations": {
"full": {
"width": 368,
"height": 272,
"url": "http://web.mit.edu/newsoffice/images/article_images/20130725220853-0.png"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment