orbfile

Web images

How to Resize Images for a Web Page

Prepare images that fit their layout, load more efficiently, and still look sharp on common screens.

By the Orbfile team2 min read

Start with the space the image will occupy

A photo that is several thousand pixels wide may be larger than necessary for a small card or thumbnail. Find the display size in the page layout first. A smaller source image can reduce download size and make the page feel faster, provided it still looks clear where it appears.

High-density screens can show more detail than a one-to-one pixel mapping, so the exact export size depends on the design. When in doubt, test the image in the actual page rather than choosing an arbitrary width.

Pick a resize method that matches the layout

Fit keeps the whole image visible within the requested dimensions, which may leave empty space on one side. Cover fills the target area but crops part of the image. Stretch forces the image into the target width and height, which can distort its proportions.

For portraits and product photos, preview the crop to make sure important details are not cut off. If the image must retain its full composition, choose a fit-style result or adjust the layout instead.

Export and test the result

After resizing, choose an output format based on the image and its destination. Use a photo-friendly format for photographs and preserve transparency for logos or overlays. Check the final image at both desktop and mobile sizes.

Keep a full-size original outside the web export folder. If the design changes later, you can make a new export without enlarging a previously reduced copy.

  • Measure the display area before exporting.
  • Use cover only when cropping is acceptable.
  • Keep the original and check the result at the actual page size.
All guides