Images usually make up most of the weight of a web page. A single unoptimised photo straight from a phone can be larger than the entire rest of the site. Visitors on mobile data will leave if a page takes more than a few seconds to appear, and search engines also prefer fast pages.
Do not upload a 4000 pixel wide photo to display it in an 800 pixel wide column. The browser still downloads all 4000 pixels and then shrinks it. Look at the largest size the image will be shown, and resize to about twice that for sharp screens at most.
More detail in our JPG vs PNG guide.
A good target for most photos is 100 to 200 KB, and for small thumbnails under 50 KB. Use the EasyLife File Converter to resize first, then compress to a size target. Quality around 70 to 80 percent is usually invisible to viewers.
Use short, descriptive, lowercase names with hyphens, for example red-ceramic-teapot.jpg, not IMG_20240615_0042.jpg. It helps organisation and gives search engines a clue about the picture.
Alt text is a short written description of the image, such as "Hand painted red teapot on a wooden table". It makes your site usable for people with screen readers and is shown if the image fails to load.
Match them to the largest size they appear on the page. A column that is 800 pixels wide needs an image about 1600 pixels wide at most for sharp high density screens. Anything larger just slows the page without any visible benefit.
Lazy loading tells the browser to download an image only when it is about to scroll into view. Adding the attribute loading="lazy" to images below the first screen speeds up the initial load. Do not use it on the main image at the top of the page.
Speed is one of many signals, and slow pages also lose visitors before they read anything. Fast, well described images help both people and search engines.
It helps on image heavy sites. The srcset attribute lets the browser pick a smaller file for small screens. If that sounds complicated, a single sensibly sized image still gets you most of the benefit.
Describe what is in the picture in a short natural sentence, for example "Founder presenting a workshop to ten students". Skip phrases like "image of" and do not stuff keywords.