DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
AVIF

How to Optimize Pictures for Websites: A Practical Guide to Smaller, Faster Images

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Optimize website pictures by delivering only the pixels a visitor needs, encoding each image in a suitable format, compressing until defects become visible, and serving responsive files that load at the right time. Then measure the page on representative devices: changing format alone does not guarantee better Core Web Vitals.

1. Start with the image’s actual job

Before exporting anything, record where the image appears, its rendered width and height, and whether it is a photograph, illustration, logo, icon, or text-heavy graphic. A 2,400-pixel desktop original delivered into a 320-pixel mobile slot wastes bandwidth and decoding work. Keep a high-quality source file, but create delivery assets around real layout slots and device pixel density.

  • Photographs: usually tolerate lossy compression and benefit from WebP or AVIF comparisons.
  • Flat illustrations and screenshots: inspect sharp edges, small type, and solid-color bands carefully; artifacts are easier to notice.
  • Logos and icons: use SVG when the artwork is vector-based, then minify and compress the SVG text.
  • Transparent artwork: choose a format that preserves the required alpha channel and test the rendered result against its page background.

Measure the displayed slot in your CSS layout, not just the source file’s dimensions. For a responsive card that renders at several widths, export a small set of candidates rather than one oversized universal file.

2. Pick a format by content and support requirements

WebP and AVIF can produce smaller files than older formats for many images, but neither is automatically best. Compare actual outputs at an acceptable visual quality and verify the browsers your audience must support. Keep a suitable fallback where your implementation requires one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
Format Good candidates Important checks
JPEG Photographs and complex scenes Lossy artifacts around text and hard edges; test quality settings.
PNG Images needing lossless data or transparency Often larger for photographs; avoid using it by default for every raster.
WebP Photographs, illustrations, and transparency Supports lossy and lossless modes; compare bytes and browser requirements.
AVIF Suitable photographs and other raster content Can be smaller at similar perceived quality; encode time and support requirements vary.
SVG Logos, icons, and other vector artwork Minify the markup and remove unnecessary metadata.

These trade-offs and examples are described in web.dev’s image performance guide. Treat format selection as an asset-by-asset decision, not a universal conversion rule.

3. Compress against visible quality

Lossy compression discards image information for smaller files and is often effective for detailed photos. Lossless compression preserves the image data but can leave a larger download. Create several candidates, inspect them at the size visitors will see, and compare file bytes.

  1. Export a baseline at the target dimensions.
  2. Produce multiple quality settings or encoder efforts.
  3. Check faces, gradients, foliage, text, diagonals, and high-contrast edges at 100% and at normal page size.
  4. Choose the smallest candidate without distracting banding, ringing, blockiness, or blurred lettering.
  5. Repeat for different image types; a setting that works for a photograph may damage a diagram.

Squoosh and ImageOptim are examples of tools discussed by the web.dev guidance. An automated image service can perform these transformations at delivery time, but compare its output, controls, and operational cost with a build-time workflow. Do not overwrite your source asset; you may need it when a slot or crop changes.

4. Generate responsive sources

Use srcset to list width candidates and sizes to describe the rendered slot. The browser can then request an appropriate resource instead of downloading a desktop image to a narrow screen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
<img
  src="/images/article-800.webp"
  srcset="/images/article-400.webp 400w,
          /images/article-800.webp 800w,
          /images/article-1200.webp 1200w"
  sizes="(max-width: 600px) 100vw, 800px"
  width="800"
  height="533"
  alt="A cyclist riding beside a river">

The sizes value must describe your actual CSS layout. If a card occupies half the viewport on large screens, do not declare it as the full viewport width. More variants improve fit but add storage, build, and cache complexity, so begin with the slots your analytics and design actually use.

Use <picture> when you need explicit format alternatives or art direction (a different crop on mobile):

<picture>
  <source type="image/avif" srcset="/images/hero-800.avif 800w, /images/hero-1200.avif 1200w" sizes="100vw">
  <source type="image/webp" srcset="/images/hero-800.webp 800w, /images/hero-1200.webp 1200w" sizes="100vw">
  <img src="/images/hero-1200.jpg" width="1200" height="675" alt="Mountain valley at sunrise">
</picture>

More responsive-image patterns are covered in web.dev’s responsive images guide.

5. Prevent layout movement and load images intentionally

Declare intrinsic width and height (or reserve the exact aspect ratio in CSS) so the browser allocates space before the file arrives. This reduces cumulative layout movement when surrounding content is still loading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
  • Apply loading="lazy" to images below the fold that are not needed immediately.
  • Keep the hero or likely Largest Contentful Paint image eager. Lazy-loading it can delay the main content.
  • Use fetchpriority="high" only for a genuinely critical image; applying it broadly competes with stylesheets, scripts, and other important resources.
  • Always provide meaningful alternative text for informative images; use an empty alt for purely decorative images.

See web.dev’s image HTML guidance for attribute and layout details, and its responsive loading guidance for hero treatment.

6. A repeatable optimization workflow

  1. Inventory: list templates and identify the largest, most frequently viewed, and most wasteful images.
  2. Measure slots: capture rendered dimensions at representative viewport widths and account for high-density screens.
  3. Export candidates: resize to those slots, then create WebP or AVIF candidates plus any required fallback.
  4. Inspect quality: compare visible defects at normal display size and at 100%.
  5. Implement selection: add srcset, accurate sizes, and picture sources where format or crop selection is needed.
  6. Reserve space: set dimensions or aspect ratios and confirm that dynamic content cannot change them unexpectedly.
  7. Set priority: lazy-load noncritical images while keeping the hero eager.
  8. Retest: inspect transferred bytes, request timing, decoding, and layout movement on representative devices and network conditions.

Image work is one part of loading performance. Google defines Core Web Vitals as real-world measures of loading performance, interactivity, and visual stability; passing or failing them cannot be inferred from a format conversion alone. Use the definitions and search context in Google’s Core Web Vitals documentation.

7. Troubleshooting common failures

The mobile device still downloads the largest file

Check that srcset uses width descriptors (such as 400w), that sizes matches the CSS slot, and that a framework or lazy-loader has not replaced the attributes. Inspect the actual requested URL in browser developer tools.

The image looks soft

You may have supplied a candidate smaller than the rendered slot, declared an incorrect sizes value, or compressed too aggressively. Add an appropriately sized candidate and retest quality.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Text or diagonals show halos

Switch to a less aggressive lossy setting, try a lossless output, or use a format and encoder better suited to the artwork. Inspect the source at 100% before blaming the browser.

The page jumps while images load

Add accurate width and height attributes or an equivalent CSS aspect ratio. Confirm that responsive crops preserve the reserved ratio.

The hero appears late

Remove lazy loading from the hero, avoid competing high-priority hints, and verify that the selected candidate is not unnecessarily large. Check request order and server response time as well as image bytes.

Modern formats fail for some visitors

Provide the fallback required by your browser-support policy through <picture> or your delivery layer, and test an unsupported-format path rather than assuming every client can decode AVIF or WebP.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. Measure the result, not just the file size

Compare transferred bytes, image request timing, decode time, LCP, and layout stability before and after the change. Test a representative mobile viewport, a larger desktop viewport, slow connections, cache misses, and pages containing several images. A smaller file can still be the wrong choice if it is blurry, arrives too late, or causes a critical image to compete with other resources.

For discoverability and presentation considerations, consult Google’s image SEO best practices. For guidance on dimensions and potential byte savings, see Google’s Optimize Images documentation.

Or skip the browser setup

If you need screenshots of optimized pages for QA, documentation, or regression checks, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes 60+ known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status.

One GET request returns PNG, JPEG, WebP, or PDF:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo documentation for the full option set, including full-page and element capture, device and retina settings, custom CSS or JavaScript, waits, request blocking, cookies, headers, geolocation, PDF controls, caching, signed links, asynchronous webhooks, bulk capture, and usage reporting. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Should every website image be converted to AVIF?

No. Compare AVIF with WebP and any required fallback for each image and quality target, then verify the browser support your audience needs.

How many responsive image widths should I create?

Create candidates for your real layout slots and common density needs; adding more files improves matching but increases storage and authoring overhead.

Does image optimization guarantee a good Core Web Vitals score?

No. It can improve loading, but Core Web Vitals also reflect interactivity and visual stability and must be measured on real-world conditions.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$229.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$151.99

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.