JPEG
A still image file format developed by the Joint Photographic Experts Group that can compress photographic images into much smaller file sizes while sacrificing only a little image quality. In other words; the space occupied by a digital photograph in JPEG (Joint Photographic Experts Group) format on a memory card or hard disk can be compressed to one-tenth without any noticeable difference in the image.

Since our eyes are more sensitive to detail than color, it compresses color information more. It also separates detail information into fine and coarse ones, and takes finer details into account less than coarse details. These operations, the details of which exceed the limits of this article, are provided by a series of mathematical formulas and compression methods.
For compression, the photo is divided into 8x8 pixel squares to be handled independently, these squares become evident as the compression increases. This causes the border lines in the picture to become prominent and the image quality to decrease. Reducing the compression will increase the file size.
The JPEG recording option is available on all cameras, from the cheapest to the most expensive. Although the compression options, or in other words, the quality setting, differ on each machine, users are always offered a choice or two.
This method should not be preferred in cases where printing is important, as photos recorded with JPEG compression lose some of their details. Using TIFF or RAW file formats instead of JPEG in professional shots will increase the quality. If your memory card is large enough, you can shoot in TIFF or RAW formats, regardless of the large file size.
For more information about sizes of your images check out out article;
https://cinema8.com/blog/how-to-optimize-your-image-size-without-losing-quality