The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use srcset to offer the browser multiple image files, and use sizes to describe how wide the image will appear in your layout. For a different crop or a format-specific source, use <picture> with a nested <img>. Include a fallback src and, when known, intrinsic width and height.
How srcset and sizes work together
srcset lists image candidates and tells the browser each candidate’s intrinsic pixel width. The sizes attribute describes the expected rendered width—the layout slot—for that image. Using the slot hint and the display’s pixel density, the browser can choose a candidate; it retains discretion over the final selection.
For example, if an image fills the viewport on narrow screens and takes half the viewport on wider screens, the markup might look like this:
<img
srcset="photo-480.jpg 480w, photo-800.jpg 800w"
sizes="(max-width: 600px) 100vw, 50vw"
src="photo-800.jpg"
width="1200"
height="800"
alt="A description of the image"
>
The numbers and breakpoints here are illustrative, not performance measurements. Replace them with candidates you actually provide and slot widths that match your CSS. The src supplies a default image reference; keep it as a fallback.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Width descriptors for layout-dependent images
Descriptors such as 480w and 800w state the pixel width of each candidate file. Pair this width-descriptor form of srcset with sizes when the rendered image width changes with the layout. The browser can use the declared slot width and device pixel ratio when choosing among candidates.
Density descriptors for fixed-size images
If an image has a fixed rendered size but needs alternatives for displays with different pixel densities, use density descriptors such as 1x and 2x. This model does not use sizes. Do not mix density descriptors and width descriptors as though they described the same selection model: use width descriptors with sizes for layout-dependent widths.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
When to use <picture> instead
Use srcset on an <img> when the candidates show the same image content and crop at different resolutions or widths. Use <picture> when the browser should select a conditional alternative source—for example, a different crop for a layout or a source in a particular format. Keep an <img> inside <picture>; it remains the image element and provides the fallback.
| Need | Use | Key detail |
|---|---|---|
| Same content and crop, different widths for a responsive layout | <img srcset> with width descriptors and sizes |
Make the slot widths in sizes reflect the actual CSS layout. |
| Same content and crop, fixed rendered size, different pixel densities | <img srcset> with density descriptors |
Use descriptors such as 1x and 2x; omit sizes. |
| Different crop depending on layout, or a conditional format source | <picture> with <source> elements and a nested <img> |
The nested <img> remains the image element and fallback. |
Make image selection match the page layout
Write sizes from the rendered slot
For width candidates, sizes is a list of media-condition and length pairs. The browser uses the first matching condition as its slot-width hint. Describe the width the image occupies in the page, not the dimensions of a candidate file. If your CSS layout changes, revisit sizes as well; a mismatched hint can lead the browser to select a candidate that does not fit the intended slot efficiently.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
The sample uses (max-width: 600px) 100vw, 50vw: up to 600 pixels of viewport width, it hints that the image occupies the full viewport width; otherwise it hints that the slot is half the viewport width. Those values are only correct if the page’s CSS actually behaves that way.
Include intrinsic dimensions when known
Set the image’s intrinsic width and height attributes when you know them, then use CSS to control its responsive rendered size. The browser can use the intrinsic ratio to reserve space as the image loads, helping reduce layout shifts even when CSS changes the displayed width.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Implement and verify a responsive image
- Identify the image behavior. Decide whether the crop and content stay the same, whether the rendered width varies with layout, and whether you need conditional formats or a different crop.
- Prepare appropriate candidates. For a layout-dependent image, provide files at known widths and list those widths with
wdescriptors. For a fixed-size image with density variants, use density descriptors instead. - Describe the slot accurately. For width candidates, write
sizesconditions that mirror the CSS layout’s rendered slot widths. Put the most specific matching conditions first. - Keep a fallback and dimensions. Set
srcto a usable default image and include intrinsicwidthandheightwhen known. For art direction or conditional formats, place the sources and fallback image in<picture>. - Check the result across layouts. Compare the rendered slot with the conditions in
sizes, and check that the listed candidates correspond to the files actually served. Selection can vary because the browser has discretion; do not assume it must always choose a particular candidate.
Performance expectations and trade-offs
Responsive candidates let the browser choose from files suited to the intended slot and display density, rather than requiring one image file for every situation. They do not guarantee a fixed reduction in bytes. The outcome depends on the source files, slot sizes, display density, compression, browser choice, and delivery conditions. Choose candidates and compression appropriate to your images, and judge the result in the context of the page’s actual layout.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting common responsive-image problems
| Symptom | Likely cause | What to check or change |
|---|---|---|
| The browser downloads a candidate that seems too large or too small for the layout. | The sizes hint may not describe the CSS slot, or the candidate set may not include a suitable width. |
Compare each matching sizes condition and length with the rendered slot, then verify the intrinsic pixel widths declared by the w descriptors. |
| The image looks soft on a dense display. | The available candidates may not provide an appropriate resolution for the rendered size and pixel density. | Check the candidate dimensions and, for layout-dependent images, use width descriptors with an accurate sizes value. For a fixed rendered size, consider density descriptors. |
| A layout change shows the wrong crop. | srcset on its own selects among candidates of the same image; it is not the pattern for conditional art direction. |
Use <picture> with conditional <source> elements and retain the nested <img> fallback. |
| The page shifts as the image loads. | The browser may not have intrinsic dimensions to use when reserving space. | Supply the known intrinsic width and height attributes and let CSS control the responsive rendered size. |
| The fallback image is missing or unsuitable. | The src reference may be absent or point to an unavailable default. |
Keep a valid src on the <img>; inside <picture>, make sure the nested <img> remains present. |
Or skip the browser setup
If you need a screenshot of a page to inspect its responsive layout, ScreenshotNeo offers a one-call screenshot API. For example, this cURL request captures a page as WebP:
Quick Recap
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie banners, popups, and chat widgets before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Learn more at ScreenshotNeo, or sign up for the 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.

