Sub topic 16
Resolution, formats and export
This chapter assumes you can already build a type and image layout in a design tool such as Figma, Illustrator, InDesign or Photoshop. It also assumes you know what pixels per inch means and how a layout adapts to different sizes, which the previous chapters covered. Here you turn the finished layout into files that look sharp and load quickly.
Resolution depends on where the file will be used
Resolution is the number of pixels in an image compared with the size it is shown at. An image that is too small gets stretched and looks soft. An image that is much too large wastes bandwidth or print memory.
- Screens: Count pixels, not inches. A 1200 px wide slot on a 2x display needs an image about 2400 px wide.
- Print: Aim for 300 pixels per inch at the final printed size. A 6 in wide photo needs about 1800 px across.
Text over images makes softness easy to see. Blurry photo edges next to crisp type look cheap, so check the image at 100% zoom before you export.
Choosing a format
| Format | Best for | Watch out for |
|---|---|---|
| JPEG | Photographs and soft gradients | Compression artifacts around text baked into the image |
| PNG | Screenshots, flat color, text on transparent backgrounds | Large files for photos |
| WebP / AVIF | Photos on the web at smaller sizes | Older software may not open them |
| SVG | Logos, icons and shapes | Not suited to photographs |
| Print layouts with live type and embedded images | Fonts must be embedded |
Keep text as live text on the web whenever you can. Text flattened into a JPEG cannot be read by screen readers and often blurs at the edges.
Exporting for several sizes
Make one export for each size you need, and pick the file at the right size in the page code. The HTML srcset attribute lets the browser choose the right file.
<img
src="coast-800.jpg"
srcset="coast-800.jpg 800w, coast-1600.jpg 1600w, coast-2400.jpg 2400w"
sizes="(min-width: 60rem) 50vw, 100vw"
alt="Waves breaking on a rocky coast at sunset">The sizes attribute tells the browser how wide the image will be shown, so it can choose the smallest file that still looks sharp.
Common export errors
- Exporting at 1x and getting a soft image on high-density screens.
- Saving a photo as PNG, which makes the file several times larger than a JPEG.
- Leaving fonts unembedded in a PDF, so the type changes on another computer.
- Sending a CMYK file to the web, which can shift colors. Use sRGB for screens.
- Resizing an exported file larger instead of exporting again from the source.
Exercise
A hero image fills a 1000 px wide slot on a website. You want it sharp on 2x screens. What pixel width should you export, and which format would you choose for a photograph?
Show answer
Export at 2000 px wide (1000 px × 2). Use JPEG, or WebP if you want smaller files, because both handle photographs well.
Exercise
You are sending a poster to print with a 4 in wide photo. What is the minimum pixel width the photo needs, and which color and font settings should the PDF use?
Show answer
At 300 ppi the photo needs at least 1200 px across (4 × 300). The PDF should use the print color mode the printer asks for, usually CMYK, and have its fonts embedded.