Visual Testing and Retina Images: If You Are Not Testing in HiDPI, You Are Not Seeing What Your Users See
Key Points
- Over 75% of mobile users and a growing share of desktop users browse on Retina or HiDPI screens (source: StatCounter, 2025)
- An image served at 1x resolution on a 2x screen appears blurry — a defect invisible on the developer's non-Retina screen
- Unit and functional tests do not verify the resolution of images served to the browser
- Visual testing on HiDPI viewports captures the rendering as the user actually sees it and detects undersized images
Visual testing, according to the ISTQB definition, refers to "verifying that a software's user interface displays according to expected visual specifications, by comparing reference screenshots with the application's current state".
Here is a problem that almost every web development team ignores: your site probably looks blurry to the majority of your users, and you do not know it.
This is not hyperbole. When Apple launched Retina screens in 2010 with the iPhone 4, the pixel ratio went from 1x to 2x. Every CSS pixel is rendered by four physical pixels. Since then, this trend has become universal. Current iPhones display at 3x. MacBook Pros, iPads, Samsung screens, Google Pixels — all use ratios of 2x or more. According to StatCounter data for 2025, over 75% of mobile sessions come from high pixel density devices.
The result: if you serve a 400x300 pixel image for a 400x300 CSS pixel display area, that image is sharp on a 1x screen. But on a 2x screen, the browser must stretch those 400x300 physical pixels across 800x600 physical pixels. The image becomes blurry. Not catastrophically blurry — subtly blurry. Enough that your logo loses its sharpness, your product photos look "unprofessional," and your icons appear pixelated.
And the worst part: you do not see it, because you may be developing on a non-Retina screen, or because your development browser does not emulate the actual pixel ratio.
The Retina Problem: A Blur Developers Do Not See
The Device Pixel Ratio Explained
The Device Pixel Ratio (DPR) is the ratio between the screen's physical pixels and the CSS pixels used by the browser. A screen with DPR 1 displays one physical pixel per CSS pixel. A screen with DPR 2 (Retina) displays four physical pixels per CSS pixel (2x2). A screen with DPR 3 displays nine physical pixels per CSS pixel (3x3).
When the browser needs to display a 200x200 pixel image in a 200x200 CSS pixel container on a 2x screen, it needs 400x400 physical pixels. If the source image is only 200x200, the browser uses an interpolation algorithm to invent the missing pixels. The result: a characteristic blur, particularly visible on images containing text, fine lines, logos, or icons.
Why Developers Do Not See It
If you develop on a non-Retina screen (an external 1080p monitor, for example), a 1x image displays perfectly. If you develop on a MacBook with a Retina screen but test with Chrome DevTools in responsive mode, the emulated DPR depends on your configuration. By default, Chrome uses DPR 1 for the most common emulated devices.
Impact on Quality Perception
Research in cognitive psychology shows that image sharpness is one of the most influential factors in perception of website quality and credibility. A study published by Google and the University of Basel (Tuch et al., 2012) demonstrated that users judge a site's credibility in under 50 milliseconds, and visual quality is the dominant factor.
Technical Solutions and Their Limits
srcset and sizes attributes
The HTML srcset attribute allows specifying multiple image versions for different pixel densities. In theory, ideal. In practice, full of pitfalls: you must generate and maintain multiple versions of each image, and nothing in your testing pipeline verifies that srcset is correct.
CSS images and media queries
For CSS background images, the conventional technique uses resolution media queries. The risk is the same: forgetting or errors in maintenance.
Vector formats (SVG)
SVG images are DPR-insensitive by nature. But not all content can be SVG. Photos, screenshots, and complex raster illustrations remain in PNG, JPEG, or WebP.
The Manual Verification Problem
All these technical solutions share a common weakness: none verify themselves. Manual verification is theoretically possible but practically impossible at scale.
HiDPI Visual Testing: The Only Reliable Verification
Capturing What the User Actually Sees
A visual testing tool configured to capture screenshots with a Device Pixel Ratio of 2 or 3 renders the page exactly as a Retina screen would. If an image is at 1x and the viewport is at 2x, the image appears blurry in the screenshot — exactly as it would on your user's screen.
Detecting Resolution Regressions
HiDPI visual testing is particularly effective at detecting regressions — situations where a 2x image stops being 2x. This happens more often than you think: CMS updates that reset image variants, storage migrations that forget high-resolution versions, template changes that replace srcset with a simple src.
Covering Different Pixel Ratios
The screen market is fragmented. Modern iPhones use DPR 3. MacBooks use DPR 2. Android screens vary between 1.5, 2, 2.75, and 3. A complete visual test captures your pages at multiple DPRs.
Beyond Images: What HiDPI Reveals
High-resolution visual testing also reveals 1px CSS borders that render differently by DPR, gradients that show banding at 2x, custom fonts with varying subpixel rendering, and favicons at insufficient resolution. For a broader perspective on how comparison algorithms work, see our guide on pixel vs perceptual comparison.
Implementing HiDPI Visual Testing in Your Workflow
Start with three representative viewports: desktop 1440px at DPR 2 (MacBook Pro), mobile 390px at DPR 3 (iPhone 14/15), tablet 810px at DPR 2 (iPad). Prioritize image-critical pages. The overhead per page is seconds.
Stop Developing Blind
The majority of your users see your site on a high-resolution screen. If you do not test in high resolution, you test a version of your site your users do not see. Visual testing at DPR 2 and 3 is not a luxury — it is a necessity for anyone serious about visual quality. Our visual regression testing guide covers the fundamentals of setting up an automated visual comparison workflow. And with a no-code tool, it is accessible: no scripts, no complex configuration, just high-resolution captures automatically compared to your baselines.
FAQ
What is the difference between Retina, HiDPI, and high resolution?
These terms describe the same concept with different origins. "Retina" is Apple's marketing term. "HiDPI" is the generic technical term. "High resolution" is the common term. All mean a screen with DPR greater than 1.
Does DPR 2 visual testing consume more resources than DPR 1?
Yes, moderately. A DPR 2 screenshot contains four times more pixels. In practice, the overhead is seconds per page and manageable storage with modern compression.
My site uses WebP or AVIF images. Does the Retina problem still apply?
Yes. WebP and AVIF are compression formats, not resolution solutions. A 400x300 WebP image is just as blurry as a 400x300 JPEG on a 2x screen.
How do I find which images on my site are not Retina resolution?
The most direct way is DPR 2 visual testing. Capture pages with the tool configured at DPR 2 and compare with DPR 1 baselines. Blurry zones appear clearly in the diff.
Does HiDPI visual testing replace srcset?
No. srcset is the code-side solution. HiDPI visual testing is the verification that the solution works correctly. Both are complementary.
Should I test at DPR 3 in addition to DPR 2?
Depends on your audience. DPR 2 covers the most common case. The difference between 2x and 3x is much less perceptible than 1x to 2x. Start with DPR 2 and add DPR 3 if your analytics justify it.
Further reading
- Visual Testing of Iframes and Third-Party Embeds: You Are Responsible for What You Do Not Control
- Visual Testing, Contrast and Color Blindness: Verify What Your Users Actually See
Your users see your site in high resolution. You should test it the same way. Delta-QA captures your pages at DPR 2 and 3 and detects blurry images before your users see them.