corincerami / mars-photo-api

A Rails API for photo data from NASA's Mars Rovers
https://api.nasa.gov/#MarsPhotos
GNU General Public License v3.0
352 stars 48 forks source link

Smaller version of images #45

Closed kriskda closed 7 years ago

kriskda commented 7 years ago

Currently from rovers/.../photos endpoint we get image url e.g. "img_src":"http://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01504/opgs/edr/fcam/FLB_531027377EDR_F0590000FHAZ00337M_.JPG" This is full version of image and in the above example it is around 250kB. I was wondering if there is a way to get lower resolution/quality images. This could be useful when displaying list of images on client side.

Maybe I'm missing something obvious but I also tried to add some parameter e.g "?quality=80 etc." to above image url.

corincerami commented 7 years ago

Hey, so this API doesn't actually host the images, that's done by NASA themselves. There's really nothing practical I can do to scale images, since the API only serves URLs. Sorry!