Created
September 27, 2017 09:30
-
-
Save rkravchik/53ace3a82ee24c9cb18557565a262927 to your computer and use it in GitHub Desktop.
vkscript photo max size uri.
<photoID> - photo ID in format "ownerid_id_accesskey".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var r = API.photos.getById({photos: <photoID>}); | |
if (r[0] == null) {return {uri: null};} | |
var p = r[0]; | |
if (p.photo_2560 != null){return {uri: p.photo_2560};} | |
if (p.photo_1280 != null){return {uri: p.photo_1280};} | |
if (p.photo_807 != null){return {uri: p.photo_807};} | |
if (p.photo_604 != null){return {uri: p.photo_604};} | |
if (p.photo_130 != null){return {uri: p.photo_130};} | |
if (p.photo_75 != null){return {uri: p.photo_75};} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment