Photos

General Information

    • Photos can be obtained by passing "getPhotos=true" into the Current Conditions API and the LocalWeather API. 

    • A list of photos in both landscape and portrait will be returned that represents the city requested and the weather conditions. 

    • The number of photos will vary depending on how many pictures are stored in the database.  (No more than 10 pictures (both landscape and portrait) of one size will be returned at a time). 

    • Five sizes of each picture are available.  The application must specify the size desired by substituting the appropriate size code into the link provided. 

    • To prevent all users from viewing the exact same picture, we recommend that the application randomizes which of the pictures in the list will be returned to the user. 

More about Photo Sizes: 

4:3 Photos
Code Definition Landscape
Width x Height
Portrait
Width x Height
S Small 240 x 180 180 x 240
M Medium 500 x 375 375 x 500
L Large 1024 x 768 768 x 1024
XL XLarge 1600 x 1199 1199 x 1600
XXL XXLarge 2048 x 1535 1535 x 2048

16:9 Photos
Code Definition Landscape
Width x Height
Portrait
Width x Height
S Small 240 x 135 135 x 240
M Medium 500 x 281 281 x 500
L Large 1024 x 576 576 x 1024
XL XLarge 1600 x 900 900 x 1600
XXL XXLarge 2048 x 1152 1152 x 2048


* The link to the photo returned by the API is for the large size.  E.g:

http://cityscapes.accuweather.com/cityscapes/France/Paris_93467552_L_L.jpg

* To get another size, for example. a small version of the landscape photo, replace "L.jpg" with "S.jpg".  Use the code from the table above to choose the size.


* Same logic applies to portrait photos: 

http://cityscapes.accuweather.com/cityscapes/France/Paris_93467552_P_L.jpg

* To get another size, for example, an XLarge version of the portrait photo, replace "L.jpg" with "XL.jpg".  Use the code from the table above to choose the size.


* The returned photos are 4:3 aspect ratio.  Append "HD" to the photo orientation to return a 16:9 photo.  E.g:

http://cityscapes.accuweather.com/cityscapes/France/Paris_93467552_LHD_L.jpg