Skip to content

Instantly share code, notes, and snippets.

@EmmanuelGuther
Last active July 10, 2020 20:10
Show Gist options
  • Select an option

  • Save EmmanuelGuther/f81c5505c4bcf21ce8aadc1d0f6fb3cf to your computer and use it in GitHub Desktop.

Select an option

Save EmmanuelGuther/f81c5505c4bcf21ce8aadc1d0f6fb3cf to your computer and use it in GitHub Desktop.
How should an image url be in the api? Well it should be an object of urls images not just a url recommended image dimensions for mobile app

How should an image url be in the api? Well it should be an object of urls images not just a url, so we can have different sizes.

Recommended image dimensions for mobile app

Thumb (~32x48) /images/xs/1-a-bomb.jpg

Small (~160x240) /images/sm/1-a-bomb.jpg

Medium (~320x480) /images/md/1-a-bomb.jpg

Large (~480x640) /images/lg/1-a-bomb.jpg

"images": {

  "xs": "https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/images/xs/1-a-bomb.jpg",
  
  "sm": "https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/images/sm/1-a-bomb.jpg",
  
  "md": "https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/images/md/1-a-bomb.jpg",
  
  "lg": "https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/images/lg/1-a-bomb.jpg"
  
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment