V
V
Vladimir Mukovoz2017-09-17 17:44:24
In contact with
Vladimir Mukovoz, 2017-09-17 17:44:24

How to request the original photo in api vk?

There is such a method
https://vk.com/dev/photos.get?params[album_id]=wal...
it gives all options for photo sizes, everything would be fine, but on different accounts the sizes in the array are located differently .. either I don't understand something here, or the one who came up with it was, to put it mildly, mistaken))) Is there any easy way to immediately request a link to the original photo or to the largest one without sorting through the entire array?
Here is more about the array
https://vk.com/dev/objects/photo_sizes
I am sending not for someone to study for me, but for them to understand that I read it and libor did not understand how to do it in a simple way or it is not written there.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serezha, 2017-09-17
Ahen @Ahen

Maybe some function like this:

var getLargePhoto = function (photo) {
  return photo.photo_2560 || photo.photo_1280 || photo.photo_807 || photo.photo_604 || photo.photo_130 || photo.photo_75;
};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question