Preparing Images for Websites: Sizes, Formats and Compression for Designers
· 3 min read · By PK Creative
Images are usually the heaviest part of a web page. Handled well, they look sharp and load fast. Handled badly, they ruin speed and search performance.
Resize before upload
A photo straight from a phone can be 4000 pixels wide and several megabytes, yet it is displayed at 800 pixels. Resize to the largest size it will actually appear, with allowance for high-density screens, usually about twice the display width at most.
Choose the right format
Each format has a role.
- WebP and AVIF: modern formats with much smaller files at similar quality.
- JPG: good fallback for photographs.
- PNG: for images needing transparency or sharp edges.
- SVG: for logos, icons and simple illustrations.
Compress sensibly
Aim for hero images under roughly 200 KB and standard content images under 100 KB where quality allows. Compare before and after at full size; reduce quality until you notice artefacts, then step back. Tools and build systems can automate this.
Serve responsive images
Offer different sizes for different screens so phones do not download desktop-sized files. Use lazy loading for images below the fold, but not for the main hero image, which should load first. Specify width and height to prevent layout shifts.
A designer's export workflow
Set up export presets for common sizes and formats so every image follows the same standard. Name layers and artboards clearly and export at the exact dimensions required, with a second density for high-resolution screens when needed.
Before handover, test the page with the real images and review the network panel. Fix the heaviest files first. A consistent workflow keeps design handoffs fast and sites quick.
Setting size targets by image type
Use rough targets: hero images 150 to 250 KB, content images 60 to 120 KB, thumbnails 15 to 40 KB, icons as SVG under 5 KB. These are guidelines; compare quality visually and adapt.
Document the targets in your design handoff so developers and content editors follow them. When everyone uses the same limits, new pages stay fast without extra effort.
Name and describe them
Use descriptive file names like website-design-ahmedabad-project.webp and write meaningful alt text. These help accessibility and image search. Learn how images affect Core Web Vitals and page speed, or have our team build an optimised site.
Frequently asked questions
- Is WebP supported everywhere?
- Support is broad in modern browsers. AVIF is also widely supported, with fallbacks available when needed.
- How big should a hero image be?
- Typically 1600 to 2000 pixels wide for large screens, compressed to a few hundred kilobytes or less.
- Should I lazy load every image?
- No. Load above-the-fold images immediately and lazy load the rest.
- optimise images for web
- WebP vs JPG
- image compression
- responsive images