Your mobile pages feel slow, and you want the biggest wins first. Mobile page speed optimization mostly means shipping less JavaScript, loading images smartly and keeping the main thread free.
This guide sits within the wider topic of mobile website development.
| Item | Value |
|---|---|
| Point where a browser task becomes a long task | Over 50 milliseconds |
| Added to median LCP when the LCP image is lazy-loaded | 624ms |
| Median mobile page, images loaded (2025 Web Almanac) | 15 images totaling 911 KB |
| Share of those images using native lazy loading | About 26% |
| Mobile pages that lazy-load their LCP image | 17% |
These figures come from a guide to deferring offscreen images on mobile, which cites the 2025 Web Almanac, and from web.dev’s Core Web Vitals guidance. They can change, so check the sources before you rely on them.
Where should you start with mobile speed?
Start by measuring, because the right fix depends on which metric fails. A Core Web Vitals checklist advises you to work down it section by section, starting with the metric that fails on mobile.
The web.dev guide adds a useful rule: you can’t judge optimizations solely on their technical merits. How likely you are to actually ship a change matters as much as its theoretical gain.
For the metrics behind these fixes, see the guide to core web vitals mobile. If you are still weighing formats, this comparison of mobile website vs mobile app may help.
A sensible order of work looks like this:
- Trim and defer JavaScript.
- Fix how images load and what size they are.
- Tame web fonts.
- Skip rendering work for content nobody can see yet.
Send less JavaScript to the phone
Phones have less processing power than the laptop you build on. One guide puts it plainly: mobile pages fight over limited connections and limited CPU, as the mobile image guide explains.
Every script you remove helps. These steps come up repeatedly in the web.dev guidance and the checklist:
- Use the coverage tool in Chrome DevTools to find unused code in your scripts, then delete it.
- Use code splitting so code that is not needed for the initial render sits in a separate bundle.
- If you use a tag manager, periodically optimize your tags and remove old ones.
- Minify your JavaScript on every build. The checklist says this typically takes 30 to 50% off the file size.
- Load third-party scripts with async or defer so they never block rendering.
Break up long tasks
According to web.dev, a task that exceeds 50 milliseconds becomes a long task, and long tasks can block the main thread from answering taps quickly. Yielding to the main thread often lets rendering updates and interactions happen sooner.
The scheduler.yield() API is one way to do it. It breaks up long tasks while letting interactions be handled without giving up their place in the task queue.
Load images the mobile-friendly way
Images are usually where a phone page gains or loses the most. The 2025 Web Almanac numbers quoted in this guide show the median mobile page loading 15 images totaling 911 KB, with only about 26% of them using native lazy loading. The rest compete for the same limited connections.

Lazy load below the fold, never the hero
Add loading=”lazy” to every image below the fold. The Largest Contentful Paint (LCP) image is the exception: the same guide cites Google research showing that lazy-loading it adds 624ms to the median LCP. It also reports that 17% of mobile pages still make this mistake.
Give the hero image fetchpriority set to high instead, as the checklist recommends. Do not combine it with lazy loading, because the two instructions contradict each other.
Native lazy loading beats JavaScript libraries on phones. The browser adjusts its trigger distance to the connection, about 1,250px on fast links and about 2,500px on slow ones, according to the same source. It also removes the need for a lazy loading script.
Pick the right format and size
Smaller files and the right dimensions do most of the work:
- Resize images to the largest size they are shown at. The checklist says correctly sized images are often 50% smaller or more with no visible loss in quality.
- Use WebP or AVIF instead of JPEG or PNG. At similar quality, the same checklist says a WebP file is typically 25 to 34% smaller than a JPEG.
- Give images a srcset, with the sizes attribute, so a phone never downloads the file meant for a large desktop screen.
- Set width and height on every image so the browser can reserve space and avoid layout shift. The mobile guide reports that 62% of mobile pages still fail to do this on at least one image.
Smaller is not always faster. A guide to the LCP image warns that a smaller AVIF might download faster, but its longer decode time could negate that benefit, especially on mobile devices. Look for long “Decode Image” tasks in the Chrome DevTools Performance panel before you decide.
Keep web fonts from slowing the first paint
Fonts compete with other files for scarce early bandwidth and can delay the first paint. Set font-display: swap in your @font-face rules so the browser shows a fallback font straight away, as the checklist advises.
Then trim what you download:
- Subset fonts to the characters your content needs. The checklist says a full Latin font of 100KB+ often drops under 20KB after proper subsetting.
- Limit weights and styles, since each extra weight adds 15 to 50KB to download.
- Match the fallback font’s dimensions to the web font with font-face descriptors, so text barely moves when the swap happens.
Skip rendering work for content nobody can see
Decoding is a real cost on phones. The mobile guide says that on a mobile processor, decoding a sequence of larger images can block the main thread for 50ms to 100ms each, causing input latency.
The CSS property content-visibility set to auto acts as lazy rendering. It tells the browser to skip layout and painting for off-screen elements, so apply it to the card or container that holds the images rather than to the img tag itself. Pair it with an intrinsic size so the container does not collapse.
As of the source’s note, content-visibility reached Baseline status in September 2024 when Safari 18 shipped support. Check current browser support yourself before you depend on it for a critical layout.
A short order of work for your next release
- Measure on a real phone connection and find the metric that fails.
- Make the LCP image eager, prioritized and correctly sized.
- Lazy load every image below the fold with the native attribute.
- Remove unused JavaScript, split bundles and defer third-party scripts.
- Subset fonts and limit weights.
- Apply content-visibility to long, repeated sections of the page.
Frequently asked questions
What should I fix first on a slow mobile page?
Show answer
Fix the metric that fails on mobile first. The Core Web Vitals checklist tells you to work down its sections starting with that metric.
Should I lazy load every image?
Show answer
No. Lazy load images below the fold, but never the LCP image, since Google research cited here shows lazy-loading it adds 624ms to the median LCP.
Is AVIF always the best image format for phones?
Show answer
Not always. AVIF gives the smallest files, but a guide to the LCP image notes that longer decode time could cancel the download savings, especially on mobile devices.
Is JavaScript lazy loading better than the native attribute?
Show answer
Usually not. Native lazy loading hands prioritization to the browser’s own mechanism, which the mobile guide calls faster and which removes the need for JavaScript lazy loading libraries.



