A good photograph is useless if it loads slowly. Preparing photos for the web improves both the visitor experience and search ranking.
The right size
Uploading an image much larger than it appears makes the page needlessly heavy. A width of 1200–1600 pixels is enough for most images on desktop; smaller versions should be served for mobile. Responsive images (srcset) let the browser pick the right size.
Format
- WebP and AVIF: Noticeably smaller files than JPEG at the same quality.
- JPEG: A common, compatible fallback for photos.
- PNG: For graphics that need transparency.
- SVG: For logos and drawings.
Compression
Lower quality to a level the eye does not notice and cut file size. A quality of 75–85% is enough for most photos.
Alt text and file name
Give every image meaningful alt text, for accessibility and visibility in image search. Keep file names descriptive (bodrum-villa-pool.webp).
Lazy loading
Load images that are not on the first screen late with loading="lazy"; give images dimensions so the page does not jump. See Core Web Vitals.
The portfolio images on this site are also converted automatically to modern formats and several sizes. For shooting and optimisation see photography, and for speed and structure web design. For the overview read why professional photos matter for your business.