Web & SEO

Optimizing Images for the Web (File Size and SEO)

Optimize images for the web: formats, compression, dimensions and alt text for a fast, better-ranked site. A step-by-step method for small businesses.

February 16, 202611 min read·The TC Automation team
Optimiser ses images pour le web (poids et SEO)
Photo: George Milton via Pexels

Images are often the single largest contributor to a web page's weight. Poorly optimized, they slow down your site, degrade the mobile experience and hurt your search rankings. The good news: a few simple habits are enough to cut file size by half or two-thirds with no visible loss of quality. Here is the complete, step-by-step method we apply at TC Automation for small and mid-sized business websites.

A heavy image means a slower load, an impatient visitor and a search engine that pushes you down the rankings. Ever since Google folded the Core Web Vitals into its ranking criteria, display speed has become a direct SEO signal. Optimizing images is no longer a technical detail reserved for developers: it is a lever for commercial performance and visibility, within reach of any business that publishes content.

The goal of this guide is simple: to give you a repeatable routine you can apply to every visual before publishing, one that ticks both the speed and the SEO boxes, with no needless jargon or expensive tools.

Why image weight drags down your SEO

Google measures how quickly the largest visual element on a page appears: this is the LCP (Largest Contentful Paint). In most cases, that element is an image: a homepage banner, a product shot, an article header photo. If it takes too long to load, your score suffers and your ranking pays the price. To dig deeper into this mechanism, our article on the Core Web Vitals explained simply breaks down each metric.

The stakes are even higher on mobile, where connections are often weaker and where the majority of your visitors first discover you. A page that takes more than three seconds to appear loses a significant share of its audience before the first click. Reducing image weight acts directly on your bounce rate, session duration and, ultimately, the number of leads or sales your site generates.

There is also a less visible effect: crawl budget. A faster site is explored more efficiently by Google's bots, which index more pages in the same amount of time. Speed therefore benefits your entire visibility, not just the page where the image sits. It is one of the pillars of good overall page load speed.

A useful order of magnitude

A photo straight from a smartphone commonly weighs several megabytes. Once resized and compressed for the web, the same image often drops below 200 KB, with no visible difference on screen. That reduction factor makes all the difference to speed, especially when multiplied across every image on a page.

Choosing the right image format

The format determines both quality and weight. There is no universal format: each type of visual has its ideal one. Choosing correctly up front spares you half of your file-size headaches. Here is how to find your way quickly.

FormatIdeal useKey strengthAvoid for
WebPWeb photos and illustrationsNoticeably lighter than JPEG at equal qualityNothing blocking today
AVIFHigh-quality photosCompression even better than WebPOld browsers, plan a fallback
JPEGPhotos, maximum compatibilityUniversal, good size/quality trade-offLogos and sharp text areas
PNGLogos, screenshots, transparencyLossless, ideal for flat colorsPhotos (very heavy files)
SVGIcons, logos, pictogramsVector, crisp at any size, very lightReal photographs

The simple rule: favor WebP for your web photos, as it is now supported by every modern browser. Keep SVG for anything logo- or icon-related, reserve PNG for images that require clean transparency, and leave JPEG as a safety net when maximum compatibility takes priority. If you are still unsure which format to pick, our dedicated comparison, WebP, JPG, PNG or AVIF: which format to choose, helps you decide case by case.

A concrete case

A tradesperson who posts job-site photos should convert everything to WebP: their visuals are numerous and heavy. Conversely, a consulting firm whose site relies mainly on a logo and pictograms will gain more by switching its icons to SVG. Match the format to the real nature of your images, not the other way around.

Resize before you compress

The most common mistake: displaying a 4,000-pixel-wide image in a slot that is only 800 pixels across. The browser then downloads millions of useless pixels that no one will ever see. Your first instinct should always be to resize the image to its actual display size before any compression. This is by far the move that delivers the most spectacular gains.

  1. 1Identify the maximum display width of the image on your site (for example 1,200 px for a full-width banner, 600 px for an in-article image).
  2. 2Resize the file to that width, optionally keeping double the size for high-density Retina-type screens.
  3. 3Then compress the resized file to shrink the weight even further.
  4. 4Check the final result on screen: if no difference is visible, you can often compress more.

To find the actual display width of a slot, a right-click followed by "Inspect" in your browser is enough to read the container's dimensions. If you handle a lot of visuals, our guide on resizing an image to the right dimensions walks through the process with no software to install.

The right order

Resize first, compress second. Compressing an oversized image is like carefully wrapping an object that is too big: the weight stays high. By handling dimensions before quality, you capture the biggest gains and avoid degrading the image needlessly.

Compress without sacrificing quality

Compression removes information the eye cannot perceive. For most web photos, a quality level around 75 to 85% offers the best trade-off: the weight drops sharply while the visual difference stays imperceptible. Below 60%, artifacts appear, especially on flat colors and gradients. The right setting is always found by eye, comparing before and after.

Also remember to strip the metadata (EXIF data, GPS location, device information) that smartphones add automatically. It bloats the file with no benefit for web display, and can even raise a privacy issue by revealing, for instance, the address where a photo was taken.

Lossy or lossless compression?

Lossy compression (JPEG, WebP, AVIF) permanently discards data to save the maximum amount of weight: it is the default choice for photos. Lossless compression (PNG, WebP lossless) preserves every pixel exactly: reserve it for logos, screenshots and images containing sharp text, where the slightest artifact would show. Picking the right mode means avoiding both oversized files and degraded results.

Compress your images online

Reduce the weight of your JPEG, PNG and WebP files right in your browser, with no installation and no visible loss of quality. Perfect for preparing your visuals before publishing and lightening your pages in seconds.

Open the image compressor

If you regularly process batches of images, our detailed article on compressing an image with no visible loss of quality gives you finer setting guidelines depending on the type of visual.

SEO beyond weight: file naming and the alt attribute

A lightweight image is only half the job. For Google to understand and value it, two elements are decisive: the file name and the alt attribute. They help the page rank and boost visibility in Google Images, a traffic channel often overlooked by small and mid-sized businesses.

  • Name your files descriptively: prefer 'ergonomic-black-office-chair.webp' over 'IMG_4382.jpg'.
  • Use relevant keywords separated by hyphens, in lowercase and without accents in the file name.
  • Fill in a clear alt attribute that describes the image for people using a screen reader and for search engines.
  • Do not cram keywords into the alt: a natural, honest sentence is more effective than a list.

The alt attribute plays a dual role: accessibility and SEO. It describes the image to visually impaired users, appears if the file fails to load, and helps Google understand the visual content. A precise, genuine description always beats an artificial pile-up of terms. It is also a foundation of web accessibility, now expected on any professional site.

An example of good alt text

For a photo of a dish on a restaurant menu, write alt="plate of mushroom risotto served at Le Comptoir restaurant in Lyon" rather than alt="risotto restaurant lyon dish food good cheap". The first is useful, descriptive and naturally rich in information; the second reeks of keyword stuffing and adds nothing.

Display techniques: lazy loading and dimensions

Two code-side settings round out your optimization. Lazy loading (the loading="lazy" attribute) delays loading images further down the page until the visitor approaches them: the page appears faster at first glance. Conversely, the main image visible right away should stay in priority loading so it does not degrade the LCP.

Always specify the dimensions (width and height) of your images in the code. This reserves the space in advance and prevents the page from jumping during loading: this is the CLS (Cumulative Layout Shift), another Core Web Vital that Google watches. Finally, the srcset attribute automatically serves an image sized for each screen, which goes hand in hand with a mobile-first approach.

Beware the CLS trap

An image with no declared dimensions makes the layout jump when it appears. The visitor clicks in the wrong place, the experience degrades and your CLS score drops. Declaring width and height is a simple, free and often forgotten fix: it is one of the first things to check during an audit.

Common mistakes to avoid

Most small-business sites do not suffer from a lack of tools, but from the same handful of bad habits. Knowing them means you have already solved most of the problem.

  • Uploading the raw smartphone photo straight into the site, with no prior processing.
  • Using a heavy PNG where a WebP would achieve the same effect at a much lower weight.
  • Lazy-loading the main image at the top of the page, which delays the very element measured by the LCP.
  • Leaving automatic file names like 'screenshot-2026-07-14.png', invisible to SEO.
  • Forgetting the alt attribute, or filling it in hastily with a list of keywords.
  • Over-compressing once and republishing: it is better to start again from the original file.
An optimized image is not a degraded image: it is an image that shows the same quality while weighing three times less.
TC Automation

The checklist to apply before every publication

Here is the list we follow systematically before putting an image online. It takes less than two minutes per visual and prevents almost every performance problem. Turn it into a reflex and your pages will stay fast over time.

  • Suitable format: WebP for photos, SVG for logos and icons.
  • Image resized to its actual display size.
  • Compression around 75-85% quality, metadata stripped.
  • Target final weight under 200 KB for a standard content image.
  • Descriptive file name with keywords in lowercase and without accents.
  • Alt attribute filled in clearly and naturally.
  • Dimensions declared in the code and lazy loading enabled outside the first visible area.

This routine is part of a broader effort: building a genuinely high-performing website, where every element is designed for speed and SEO from the start.

Frequently asked questions

Which image format should you choose for the web in 2026?

For photos, WebP is the best default choice: it is lighter than JPEG at equivalent quality and supported by every modern browser. Reserve SVG for logos and icons, PNG for images with clean transparency, and keep JPEG as your maximum-compatibility fallback.

How do you reduce an image's weight without losing quality?

Work in order: first resize the image to its actual display size, then compress it to around 75 to 85% quality. Finally, strip the EXIF metadata. This simple sequence is usually enough to cut the weight by half or two-thirds with no visible difference on screen.

How much should an image weigh on a website?

For a standard content image, aim for a final weight under 200 KB. A full-width banner can go a bit higher, but rarely beyond 300 to 400 KB once properly optimized. The key is to avoid multi-megabyte files, which are common when you upload a raw photo.

Why are my images hurting my search rankings?

Because Google measures display speed through the Core Web Vitals, including the LCP, which often corresponds to an image. An overly heavy image delays that measurement point, degrades the mobile experience and increases the bounce rate, all negative signals for your ranking.

What is the alt attribute of an image for?

The alt attribute describes the image for people using a screen reader and for search engines. It improves accessibility, appears if the file fails to load, and helps Google understand and then rank your visual, notably in Google Images. Write it as a natural, honest sentence.

In summary

Optimizing your images rests on a simple chain: choose the right format, resize to the actual size, compress intelligently, then take care of file naming and the alt attribute for SEO. Add lazy loading and declared dimensions, avoid the few classic mistakes, and you tick both the performance and the SEO boxes.

These steps are within reach of any small or mid-sized business, but applying them consistently across an entire site takes method and discipline. At TC Automation, we build fast, well-ranked websites, with optimized image management from the design stage. If you want a site that loads quickly and ranks for the long term, let's talk about your project: it is often the difference between a site that exists and a site that performs.

#images#performance#seo#web#core web vitals#webp#compression
All articles
Ad Space