How Do I Optimise Images for My Website?
How to optimise website images: right size, best format, compression, lazy loading and file names, so your pages load fast without looking blurry.

Short answer: Optimise images by resizing them to the largest size they'll actually display, compressing them, saving them in a modern format like WebP or AVIF, and serving different sizes to different screens with responsive image markup. Add width and height attributes to prevent layout shift, lazy-load images below the fold but never your main hero image, and write useful alt text. Done well, this often cuts page weight dramatically and is the single quickest speed win on most small business sites.
Images are usually the heaviest thing on a page. A single photo straight off a modern phone can be several megabytes, bigger than an entire well-built web page. Here is how professionals handle images, and why it matters for speed, Google and your customers.
Why images slow sites down
On most small business sites, the largest visible element when the page loads is a photo: the hero banner, a team shot or a product image. Google's Largest Contentful Paint (LCP) metric measures how long that element takes to appear, and "good" means under 2.5 seconds. A huge, unoptimised hero image is the most common reason sites fail LCP on mobile.
Images also cause layout shift when they load without reserved space, pushing text down as the visitor is reading. That's measured by Cumulative Layout Shift (CLS), where good is under 0.1. So image handling touches two of the three Core Web Vitals. See Core Web Vitals explained for the full picture.
The four levers: dimensions, compression, format, delivery
1. Dimensions: stop sending giant pictures
Phone photos are often 4,000 pixels wide or more. Even a big desktop layout rarely displays an image wider than about 1,600 to 2,000 pixels, and on a phone it might be 400 to 800 CSS pixels wide (doubled for high-density screens). Sending a 4,000 pixel image to be shrunk by the browser wastes bandwidth and memory.
Rules of thumb we use:
- Full-width hero: export around 1,600 to 2,000 pixels wide, with smaller versions for phones.
- Content images in a text column: around 1,200 pixels wide maximum.
- Thumbnails and gallery grid: 400 to 800 pixels.
- Logos and icons: use SVG wherever possible.
2. Compression: lossy is your friend
Lossy compression throws away detail the eye barely notices. For photos, a quality setting around 70 to 82 usually looks indistinguishable from the original at a fraction of the size. Lossless compression keeps every pixel but saves less. Use lossy for photos, lossless or SVG for logos, diagrams and screenshots with sharp text.
3. Format: pick the right one for the job
| Format | Best for | Notes |
|---|---|---|
| WebP | Photos and graphics | Usually much smaller than JPEG at similar quality; supported by all modern browsers |
| AVIF | Photos | Often smaller still than WebP; slower to encode; very widely supported now |
| JPEG | Photos, fallback | Universal, fine as a fallback |
| PNG | Graphics needing transparency, screenshots | Large for photos; avoid for photography |
| SVG | Logos, icons, simple illustrations | Vector, tiny, sharp at any size |
| GIF | Almost nothing now | Use a short video file instead of animated GIFs |
4. Delivery: responsive images and smart loading
Responsive images let the browser choose the right file for the screen. The srcset and sizes attributes list several widths, and the browser picks the smallest one that will look sharp. The <picture> element lets you offer AVIF and WebP with a JPEG fallback.
Then:
- Add
widthandheightattributes to every image so the browser reserves space and avoids layout shift. - Use
loading="lazy"on images further down the page, so they load only when needed. - Never lazy-load your hero image. It delays your LCP. Instead, consider
fetchpriority="high"on it so the browser fetches it first. - Serve images from a CDN so they come from a server near the visitor.
A worked example: a photographer in Toronto
An illustrative wedding photographer has a portfolio homepage with a full-screen hero and a grid of 30 images, all uploaded directly from camera exports at around 5 to 8 MB each. On mobile, the page takes ages to show anything, and visitors bounce before seeing the work.
The optimisation pass:
- Export the hero at 2,000 pixels wide, plus 1,200 and 800 pixel versions, in AVIF and WebP with JPEG fallback.
- Export grid images at 800 pixels wide (the largest they display), quality around 75.
- Add width and height to every image.
- Lazy-load the grid, give the hero high fetch priority.
- Link each grid image to a larger 1,600 pixel version for people who want detail.
The page goes from tens of megabytes to a small fraction of that on first load, the hero appears quickly, and the grid fills in as visitors scroll. The photos look just as good, which is the point: optimisation is about removing waste, not quality people can see.
Want images handled for you, perfectly, every time?
Every SiteDrum site automatically serves modern, responsive images from a global edge network. Check our plans, or run our free speed test on your current site first.
Tools for owners who do it themselves
- Squoosh (free, in the browser): compare formats and quality side by side.
- Desktop editors like Photoshop, Affinity or free alternatives: use "export for web" options with WebP support.
- WordPress image plugins: can convert and compress automatically, though they add plugin overhead.
- Image CDNs: resize and convert on the fly based on the visitor's device.
Mistakes to avoid
- Uploading straight from the phone. The single most common cause of slow small business sites.
- Relying on CSS to shrink images. The browser still downloads the full file.
- Lazy-loading the hero. Kills your LCP.
- Missing width and height. Causes layout jumps and poor CLS.
- PNG photos. Often several times larger than necessary.
- Sliders and carousels with ten huge images. They load lots of weight for slides almost nobody sees. One strong image usually beats a carousel.
- Over-compressing. Blotchy, smeared images make your business look cheap. Check results at full size on a decent screen.
- Text inside images. It's invisible to Google and screen readers, blurry on some screens and impossible to edit. Use real text.
- Meaningless file names.
IMG_4482.jpgtells Google nothing;kitchen-extension-leeds.webphelps a little.
Don't forget the human side
Optimised images still need to be good images. Real photos of your work, team and premises build far more trust than stock. Write alt text that describes what matters in each image (our guide to alt text covers how). And keep important information in text, not baked into graphics.
A simple workflow for every new photo
Optimisation works best as a habit rather than a once-a-year clean-up. Here's a routine any owner can follow before uploading a photo:
- Choose the best shot and crop it to the shape the page needs, removing clutter at the edges.
- Resize it to the display width (for example 1,200 pixels for a content image).
- Export as WebP at around quality 75, and check it at full size for smearing.
- Rename the file descriptively, such as
oak-staircase-renovation-york.webp. - Upload, add alt text, and confirm the platform isn't re-inflating the file.
It takes a minute per photo once you're used to it. If you add photos regularly, such as a gallery of completed jobs, that minute pays for itself in faster pages every single time.
Our take
We're slightly obsessive about images because we see the difference every day: the same site, the same photos, going from sluggish to instant after a proper optimisation pass. It's the highest-return speed fix for almost every small business site we look at. On SiteDrum sites we handle all of it at build time: multiple sizes, modern formats, correct dimensions, sensible lazy loading and edge delivery. You just send us your photos.
If you love doing things yourself on a builder platform, you can get most of the benefit by resizing and compressing before upload. You don't need us to fix your images. But if your site is still slow after that, the problem is usually deeper, in the platform itself, and that's when a rebuild or Website Rescue makes sense.
Quick checklist
- Resize every image to the largest size it actually displays (plus 2x for sharp screens).
- Export photos as WebP or AVIF at quality around 70 to 82.
- Use SVG for logos and icons.
- Provide multiple sizes with srcset and sizes.
- Add width and height to every image tag.
- Lazy-load below-the-fold images; prioritise the hero.
- Rename files descriptively and write alt text.
- Retest mobile speed after changes.
The bottom line
Image optimisation is resizing, compressing, choosing modern formats and delivering the right file to the right screen. It's not glamorous, but it's usually the fastest way to make a small business site feel quick, improve Core Web Vitals and keep mobile visitors around long enough to call you.
Frequently asked questions
What is the best image format for websites?
For photos, WebP and AVIF are usually the best choices, offering much smaller files than JPEG at similar visual quality and broad browser support. Use SVG for logos and icons, and keep a JPEG fallback if you need to support very old browsers. PNG suits screenshots or graphics needing transparency, not photographs.
How big should images be for a website?
Size images to the largest width they actually display, with a higher-resolution version for sharp screens. As a rule of thumb, full-width heroes around 1,600 to 2,000 pixels wide and content images around 1,200 pixels, with smaller versions served to phones. File size matters as much as dimensions, so compress them too.
Does image optimisation help SEO?
Yes, indirectly and directly. Faster images improve page experience and Core Web Vitals such as LCP, which Google considers, and descriptive file names and alt text help images appear in image search. Faster pages also keep visitors engaged, which supports your enquiries.
Should I lazy-load all my images?
No. Lazy-load images below the fold, but load your main hero or top-of-page image immediately, ideally with high fetch priority. Lazy-loading the largest visible image delays Largest Contentful Paint and can make the page feel slower.
Will compressing images make them look worse?
Sensible lossy compression, around quality 70 to 82 for photos, is usually invisible to the eye while cutting file size significantly. Over-compression causes blotchy artefacts, so always check results at full size before publishing. The goal is removing waste, not visible quality.
Want a website that brings you customers?
Tell us what you do on WhatsApp and we will send a fixed quote and a free mockup.
Get my free mockupRelated guides
Our products
Website design near you
Website design in LondonWebsite design in New YorkWebsite design in TorontoWebsite design in LeedsWebsite design in Las VegasWebsite design in BelfastWebsite design in San FranciscoWebsite design in MumbaiWebsite design in BaselWebsite design in AucklandAll cities →
SiteDrum home · All guides · Sitemap · Contact us
More tech guides
- Do I Need Google Analytics on My Small Business Website?
- Can I Move My Website to Another Host or Provider?
- What Is a Favicon and Do I Need One for My Website?
- What Is a 404 Page and How Do I Fix 404 Errors on My Website?
- What Is Website Uptime and How Much Should I Expect?
- What Is a CDN and Does My Small Business Website Need One?
- What Is DNS and Why Does It Matter for My Website?
- How Do I Connect My Domain Name to My Website?