Images, as well as text, should be adapted to the place of publication using tools designed to process images such as free popular tools
The images you publish on the website using the CMS system should be optimized to be in JPEG format. The JPEG format works in 100% browsers and is, therefore, the best choice. In addition to the JPEG format, PNG is also used for raster image format, raster images are “artificial”, digitally generated graphics, and PNG is also supported in all browsers.
There are also more modern formats with better compression such as WEBP but they do not have 100% browser support so you still need to set up JPEG/PNG alternatives so that all users have a good experience. When it comes to extremely highly visited sites it makes sense to deal with the WEBP format otherwise there are smarter things to spend time and money on.
Often clients want to process their images using the CMS system, but this is not possible and when it is possible there are limits on what can be done. So the fact is that you need to learn to use adequate image processing tools, such as those listed above.
The image resolution, in 99% of cases, should not exceed 2560px and in most cases, it is advisable to choose a lower resolution such as 1200px because it is often sufficient and covers the most commonly used width of the website.
The best aspect ratio for the website is 4:3 and for banners is 3:1. Note that the 3:1 ratio does not work well on mobile, so it is often supplemented with a 1:1 ratio or 4:3.
Each JPEG image is compressed according to a certain quality that has a scale from 0% to 100%. For the web, it is best to use values between 40% and 75%. It is difficult to define the exact number because all photos are different and are subject to the subjective impression, the perception of the observer. So you should lower the quality as much as possible but retain the adequate visual quality of an image. For this, you need to have some experience and test different settings for the best results.
As a rule, 90% of photos should be smaller than 500KB or be in the range from 50KB - 1MB depending on the details of image, size, and complexity.
The multimedia of each website has the greatest impact on the speed of the page itself and takes up about 70% of the transfer and storage space, so it is important to have a clear plan from the beginning on how would you process your images before you upload them to the CMS. The processing and preparation process cannot be skipped and there is no magic automatic tool that will do the job for you and yield great results.