Answer the question
In order to leave comments, you need to log in
By what principle are double photos taken in VK?
Many times I saw pictures under posts, etc., when you open them, then there is already a different image, how can this be implemented at the api level, do you need to replace some data when uploading or saving photos to the VK server or what?
Answer the question
In order to leave comments, you need to log in
The principle is that the picture in VK has links to several copies of different sizes.
The screenshot shows that we have sizes s, m, x.
Each size has its own link to a file of that size.
When viewing a feed or comments, an image of the smallest or medium size is displayed (because it makes no sense to load and display a large size at once). And if you open it for viewing, then another picture is loaded - the maximum size (or the original).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question