For ordinary offscreen images, add loading="lazy" to the React <img> element. Keep images visible at initial page load—especially the likely Largest Contentful Paint (LCP) image—eager so the browser can discover and fetch them promptly. Add intrinsic dimensions when known to reserve space and reduce layout shifts.
Use the browser’s native lazy-loading hint
React passes the loading prop to the rendered image. Set it to lazy for an image that is not needed in the initial viewport:
As an Amazon Associate I earn from qualifying purchases.
function ArticleImage() {
return (
<img
src="/images/article-detail.jpg"
alt="A reader looking at an open book"
width={1200}
height={800}
loading="lazy"
/>
);
}
The browser decides when to fetch the image as it approaches the viewport; the hint does not require a React library or custom scroll handler. React documents eager as the default and describes loading="lazy" as asking the browser to defer loading until the image approaches the viewport (React <img> reference). MDN likewise describes native lazy loading as deferring offscreen resources until the user scrolls near them (MDN: Lazy loading).
Recommended Free Tools
Choose which images should load lazily
Keep the initial, important image eager
Do not blanket-apply lazy loading to every image. Images already visible when the page opens should normally remain eager, particularly the likely LCP image. Delaying that image can delay its discovery and loading, working against the performance goal. web.dev recommends avoiding lazy loading for images likely to be in the initial viewport (web.dev: Browser-level image lazy loading for the web).
#1 Best Overall
For an image that should load immediately but at lower priority, React documents fetchPriority="low" as a distinct option. In server-rendered React, loading="lazy" prevents React’s automatic preload hint for that image; fetchPriority="low" also opts it out of that preload while retaining immediate loading at lower priority. These are different choices, not interchangeable ways to lazy-load an image (React preload reference).
Lazy-load images below the fold
Use loading="lazy" for images that are not needed until a reader scrolls toward them. The browser controls the precise fetch threshold, so this is a loading hint rather than a guarantee that the request starts at a specific pixel distance.
Reserve image space and choose responsive sources
When dimensions are known, include width and height. The browser can use them to reserve the image’s space before its bytes arrive, helping avoid reflow as content loads. For responsive assets, srcSet and sizes help the browser select an appropriate resource; they complement rather than replace the loading hint (React <img> reference).
<img
src="/images/landscape-1200.jpg"
srcSet="/images/landscape-600.jpg 600w, /images/landscape-1200.jpg 1200w"
sizes="(max-width: 600px) 100vw, 800px"
alt="Mountain landscape at sunrise"
width={1200}
height={800}
loading="lazy"
/>
Lazy loading defers requests; it does not compress image bytes. If images are still large, address formats, dimensions, and compression separately. MDN treats image compression and making image dimensions knowable as separate fast-page considerations (MDN: Author fast-loading HTML pages).
When to use Intersection Observer instead
For typical offscreen images, start with native loading="lazy". Use the Intersection Observer API when you need custom behavior triggered by visibility—for example, a particular placeholder transition or application-controlled request timing. That adds implementation decisions around placeholders, failed requests, thresholds, and target-browser support. Compare it with the native hint against your actual audience and measured requirements; the cited documentation does not establish a need for a library for an ordinary React page.
Do not confuse image loading with React.lazy(). React’s lazy API defers loading component code until the component is first rendered; the HTML image loading="lazy" hint concerns fetching an image (React lazy reference).
Validate the result on your page
-
Inspect the initial viewport at representative mobile and desktop sizes. Identify the images visible immediately and the likely LCP image.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Leave those important initial images eager. Add
loading="lazy"to images farther down the page. -
Add intrinsic width and height when known; keep suitable
srcSetandsizesvalues for responsive images. -
Inspect the rendered HTML and browser network panel. Confirm that the important visible image begins loading promptly and that offscreen image requests are deferred as expected.
-
Compare performance before and after with a consistent test setup. The outcome depends on the actual page and loading conditions; do not assume a speedup without measuring it.
PerformanceWindows Errors? Fix Them Before They SpreadDriversOutdated Drivers Are Slowing You DownPerformancePC Slower Than It Used to Be?Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Common problems and fixes
-
The hero image appears late. It may have been marked lazy despite being visible initially. Remove
loading="lazy"from the likely LCP image and check the rendered markup and network request timing. -
Images shift the page as they load. Supply accurate intrinsic
widthandheightvalues when available so the browser can reserve space. -
A responsive image is not choosing the expected file. Check the
srcSetcandidates andsizesdescription. Those select the resource;loadingonly influences when fetching occurs. -
An image has no source yet. React warns against an empty string for
src. Omit the image element until a source exists, or usenull, rather than renderingsrc=""(React<img>reference).Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
A framework image component behaves differently from a plain
<img>. Check that component’s documentation and inspect its rendered HTML. Frameworks may provide their own lazy defaults or explicit preload options. -
The page still transfers too much image data. Lazy loading does not reduce the size of an image that is eventually fetched. Review compression, format, and responsive variants separately.
Or skip the browser setup
If your goal is to capture a page image rather than implement lazy loading in your own React UI, ScreenshotNeo provides a screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF; the API also supports full-page captures with lazy images loaded. See the ScreenshotNeo API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
-
Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; each of those steps can be turned off.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing. Responses include
X-Page-VerdictandX-Billedheaders. -
An MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs.
-
The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Quick Recap
SaleBestseller No. 3SaleBestseller No. 4
Sign up for ScreenshotNeo’s free plan.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors

