1. Home
  2. Guides
  3. How to Optimize Images for Mobile Devices

How to optimize images for mobile devices

Updated November 20, 2026

On a phone, images compete with a slower connection, a smaller screen and a data plan. Serving the right pixels is the whole job.

The short answer

A phone needs fewer pixels than a desktop monitor, but denser ones. Aim for an image about twice as wide as its on-screen width, never more, compress it to WebP or AVIF, and let the browser pick between sizes with srcset. Everything else is detail.

Why mobile is different

  • The connection varies. A phone moves between fast Wi-Fi and a weak mobile signal. A page that loads in one second at home may take much longer on the train.
  • The screen is narrow. A phone shows a page about 360 to 430 CSS pixels wide. A 2400-pixel hero image is useless there.
  • Data is not free. Many visitors pay for their data or have a monthly cap. Heavy pages also drain battery, since decoding large images takes work.

How many pixels does a phone need?

Phone screens are high-density: each CSS pixel is drawn with two or three physical pixels. For a full-width image on a 400-pixel-wide phone, 800 pixels is sharp on a 2× screen; 1200 pixels covers a 3× screen, but the visible gain is small and the file is more than twice as heavy. In practice, 800 to 1000 pixels wide is a sound ceiling for mobile images in a content column.

Where the image appearsDisplay width (phone)Suggested file width
Full-width banner360 to 430 px800 to 1000 px
Image inside text320 to 400 px700 to 900 px
Product grid thumbnail150 to 200 px400 px
Avatar or icon40 to 80 px160 px

For a deeper look at the units involved, read image resolution explained.

Serve several sizes

You do not have to choose between phone and desktop. With the srcset and sizes attributes, you provide several widths of the same image and the browser downloads the one that fits the screen:

<img src="photo-800.webp"
     srcset="photo-480.webp 480w, photo-800.webp 800w, photo-1600.webp 1600w"
     sizes="(max-width: 600px) 100vw, 800px"
     width="800" height="533" alt="Description of the photo">

Create each width with Resize image, then compress each one. The width and height attributes reserve the space so the page does not jump while loading.

Choose a modern format

All current mobile browsers display WebP and AVIF. A photo in WebP is typically a quarter to a third lighter than the same photo in JPG, and AVIF can go further (see WebP vs AVIF). Use Convert to WebP or Convert to AVIF. Keep a JPG fallback only if you must support very old devices.

Quality settings that suit small screens

A small screen hides compression artifacts better than a large one, so you can compress a little harder: 70 to 80% quality is usually fine for photos viewed on a phone. Look at the result at actual size rather than zoomed in. If you see blocky areas in skies or around text, raise the quality by five points.

Other habits that help

  • Lazy-load images below the first screen, but not the main image at the top.
  • Crop for the phone. A wide landscape banner becomes tiny on a portrait screen; a tighter crop with the subject centered works better.
  • Avoid text baked into images. It cannot reflow and becomes unreadable when shrunk. Use real text over a background image.
  • Replace animated GIFs with short video or WebP animation: they are far lighter.

Checking on a real phone

Use your browser's device emulation to simulate a phone, throttle the network to "Fast 3G" and look at how long the main image takes to appear. If you can, try a real phone away from Wi-Fi. A total page weight under 1 MB on mobile is a good target for a simple content page. For the effect on loading metrics, see images and Core Web Vitals.

Tools for this

More guides