As Google and Yandex store an infinite number of photos?

As Google and Yandex store an infinite number of pictures?
In the database they image is stored as pixels, then you can easily identify a duplicate and keep only the originals. Combinations of pixels are limited.
One 32-bit pixel is 16,777,216 options. One pixel takes 4 bytes, thus a single-pixel images would require 4 * 16777216 = 64 MB storage. For images to 2048 x 2048 - combinations will 16777216 * 2048 * 2048 = 70368744177664 (right?) that will require "only" 256 TB.
June 10th 19 at 15:24
4 answers
June 10th 19 at 15:26
As Google and Yandex store an infinite number of photos?
No way. To store an infinite amount of information is impossible.
They store a finite amount of information, its volume is known, the growth is predictable.

Your math with pixels is lame. We should start to get acquainted in what form the image is stored.

No pixels there.
There is a file which is necessary to preserve - known for its volume, so it is easy to calculate how many discs should be added.
June 10th 19 at 15:28
In the first formula why you took the multiplication, not exponentiation, so you get funny little number
Pictures of finite and lie on the disks
June 10th 19 at 15:30
On Google there is a Photo for reference :
The choice of the size of the saved photos and videos
You can choose the size of photos and videos uploaded to Google Photos library, or free space in Google Drive.

On your computer, open the page
Select one of the options: high quality or original size.
"High quality"
You can store unlimited number of files.
The photos are compressed to save space. If the photo resolution exceeds 16 m., it will be reduced to this value.
This is enough to print photos in the size 61x40,6 see
If the video resolution exceeds 1080p, it will be reduced to this value. If the video resolution does not exceed 1080p, the saved file the quality will not be inferior to the original

Same goes for Google Drive - Google shakes some file formats that they do not take up much space on the servers.
The same technology applies and Yandex.

Compression is the conversion, which allows you to then "expand" the image or document.

If the question relates to search Engines, neither Google nor Yandex — don't keep anything, but only displays the URL links to images.
June 10th 19 at 15:32
First, the number of images in the cache of the search engines, never infinite, just very large.
Secondly, images are not stored in the cache at the original resolution - the size does not exceed 300 something pixels on the long side.
Thirdly, most of the images still stored compressed in JPEG. In practice, their size is not exceeded 15 kilobytes (usually less than eight).

Find more questions by tags GoogleYandexData storage