Images on websites are pretty useful things, not only one illustration is worth a thousand words, there are countless other ways to use them when writing things that will be posted on the internet.
Size your images accordingly. As a rule of thumb, the image should not look out of place in a browser window that is 800 pixels wide by 600 pixels tall. All image editing programs are able to re-size images.
Compress things for the web. Pages must load quickly, so keep the pixels down to what is necessary and lower the color depth if you can, it will save you bandwidth, money and the site visitors will get the page loaded much faster.
Provide a high resolution version, if appropriate. If the visitor wants to see a multi-megabyte image, they should be able to click a link placed in a related way to the image that it refers to.
Provide placeholders. Some people prefer to use browsers that cannot display images, or are unable to see them for technical or medical reasons, thus they require a text placeholder for images, it only takes a few seconds to add, and greatly improves quality of pages.
Don't overload pages with graphics. The internet is made for text. Treat your website as if it was a book that just happens to have a convenient way to jump to different pages through hyperlinks. Books are mostly made of text, so should a website. Overuse of images is usually compensation for the lack of text, which is why modern websites all look so pointless.
Don't spam GIFs. I can understand the temptation, but website visitors don't want flashing pictures of cats to distract them from reading text on the page, they will probably hit the back button and get out without reading any of the things you wrote.
This is an example of how to place an image on a page. This is a 47kByte image compressed as a PNG file. All technical considerations are met.
The image is center-aligned, has enough clearance around it, allowing text to be easily read, the placeholder is present in the filename, just how the W3C intended.
If you are too lazy to write placeholders, ChatGPT can do it for you.