Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchUse an <img> element and point its src attribute to the PNG’s reachable path or URL:
<img src="images/photo.png" alt="A red kite flying over a field">
The img element is a void element, so it has no closing tag. The browser resolves a relative path from the page URL, downloads the PNG, and displays it. Use useful alternative text, verify the exact filename and capitalization, and add intrinsic dimensions when you know them.
The minimum PNG markup
A standalone PNG normally needs only img, src, and alt. The src value is an image URL; it can be relative to the current page or an absolute HTTP(S) URL. At least one of src or srcset is required by the HTML image element specification (MDN’s img reference).
<img src="images/photo.png" alt="A red kite flying over a field">
Do not write </img>. Because img is a void element, a closing tag is invalid and unnecessary.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
Point src at the right file
Paths are resolved from the URL of the HTML document, not from whatever folder your code editor happens to show. These common layouts illustrate the correct values:
| Project layout or situation | Markup |
|---|---|
index.html beside logo.png |
<img src="logo.png" alt="Company logo"> |
index.html in the project root and PNG in a sibling images folder |
<img src="images/logo.png" alt="Company logo"> |
| PNG in a parent directory of the page | <img src="../logo.png" alt="Company logo"> |
| PNG hosted on another site at a known address | <img src="https://cdn.example.com/logo.png" alt="Company logo"> |
The slash direction matters: web URLs use forward slashes. A path such as C:UsersmeDesktoplogo.png points to your computer’s filesystem and is not a public website URL. Upload the file to the site (or another host) and use the URL that visitors can reach. MDN’s HTML images tutorial explains the same relative-versus-absolute URL rule.
Relative paths and the page URL
If the page is served at https://example.com/products/index.html, images/item.png resolves under /products/images/item.png. Moving the page to another directory can therefore break an otherwise unchanged image tag. A root-relative path such as /images/item.png starts at the website’s domain root, while an absolute URL includes the full scheme and hostname.
Check spelling and capitalization
On many web servers, Logo.png and logo.png are different files. Match the directory names, filename, extension, and capitalization exactly. Paste the final URL into a browser: if it does not load there, the img element cannot load it either.
Recommended Free Tools
Rank #2
Write useful alternative text and reserve space
Alternative text is read when the image cannot be seen and by people using assistive technology. Describe the image’s content or purpose in the surrounding context; do not use a filename or the generic phrase “image.”
<img src="team.png" alt="The support team gathered around a conference table">
For a purely decorative image that conveys no information not already present in nearby text, use an empty value so assistive technology skips it:
<img src="swirl.png" alt="">
When the intrinsic dimensions are known, include both width and height. The browser can reserve that rectangle before the PNG arrives, reducing layout movement. CSS still controls the rendered size.
<img src="hero.png" alt="Mountain trail at sunrise" width="1600" height="900">
For a fluid image that stays inside its container, a typical rule is:
Rank #3
img {
max-width: 100%;
height: auto;
}
Do not distort the aspect ratio by setting unrelated width and height values unless you intentionally want cropping or stretching.
Use responsive PNG candidates when one file is not enough
A single src works for a fixed image. If you have several resolutions, use srcset. With width descriptors, sizes tells the browser how wide the image will appear so it can choose an efficient candidate. The final img remains the fallback and supplies its alternative text.
<img
src="photo-800.png"
srcset="photo-400.png 400w, photo-800.png 800w, photo-1600.png 1600w"
sizes="(max-width: 600px) 100vw, 800px"
width="1600"
height="900"
alt="A red kite flying over a field"
>
Use the picture element when the source should change by media condition or format, such as a different crop on narrow screens or a modern format with a PNG fallback:
<picture>
<source media="(max-width: 600px)" srcset="portrait-crop.png">
<source type="image/webp" srcset="photo.webp">
<img src="photo.png" alt="A red kite flying over a field" width="1600" height="900">
</picture>
Guidance on srcset, sizes, and picture is covered in MDN’s Using images in HTML and image format guide.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsRank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
| Need | Use |
|---|---|
| One known PNG | img src="..." |
| Same image at several widths | img with srcset and (for width descriptors) sizes |
| Different crops, viewport conditions, or formats | picture with one fallback img |
A complete page you can copy
This example assumes index.html is next to an images folder containing logo.png and hero.png:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PNG example</title>
<style>
img { max-width: 100%; height: auto; display: block; }
.hero { max-width: 60rem; margin: 2rem auto; padding: 0 1rem; }
</style>
</head>
<body>
<header>
<img src="images/logo.png" alt="Acme company logo" width="240" height="80">
</header>
<main class="hero">
<h1>Explore the trail</h1>
<img src="images/hero.png" alt="Mountain trail at sunrise" width="1600" height="900">
</main>
</body>
</html>
Keep the paths relative to this file’s served URL. If your server publishes the page at a nested route, confirm that the browser requests the directory you intended.
When the PNG does not appear
Work through these checks in order:
- Inspect the request. Open browser developer tools, select the Network panel, reload the page, and find the PNG request. A 404 usually means the path or filename is wrong; a 403 indicates that the server is refusing access.
- Open the image URL directly. Copy the requested URL from the Network panel and open it in a new tab. Fix the server location or deployment if that URL is not reachable.
- Compare every character. Check folder names, capitalization, extension, and accidental spaces. Verify that the deployed file is actually included in the build output.
- Recalculate the relative path. Start at the page’s URL directory and walk through each folder. A page moved from
/to/docs/may need../images/photo.pnginstead ofimages/photo.png. - Remove an empty or accidental source. An empty
srccan trigger an unintended request. Ensure your template did not replace the URL with an empty variable. - Check the file itself. A truncated or corrupted PNG, unsupported metadata, or a file that is not really a PNG despite its extension can fail to decode. Re-export or replace it and test the new URL.
- Check network and access controls. Confirm the user can reach the host, authentication is not required unexpectedly, and the server returns an image response rather than an HTML error page.
MDN lists empty sources, corrupted data, unsupported formats, and inaccessible resources among image-loading failure causes (img reference). The Network panel reveals the actual status code and requested URL faster than guessing in the markup.
Deployment and maintenance checklist
- Put the PNG in the directory that your web server publishes.
- Use a URL relative to the page, or a complete reachable absolute URL.
- Match case and extension exactly.
- Give informative images concise
alttext; usealt=""for decoration. - Set intrinsic
widthandheightwhen known. - Use
srcset/sizesfor multiple resolutions andpicturefor conditional sources. - Test the deployed URL, not only a local editor preview.
Or skip the browser setup
If the PNG you need is a screenshot of a web page, ScreenshotNeo can return a PNG, JPEG, WebP, or PDF from one GET request. It accepts cookie and consent banners as a visitor, then removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.
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 →Use the API documentation at screenshotneo.com/docs/ for the complete option set. The endpoint can capture a full page with lazy images loaded, one CSS-selected element, dark mode, any viewport or one of 12 device presets, retina scale, custom CSS or JavaScript, clicks before capture, hidden selectors, selector/delay/network-idle waits, blocked ads or resource types, custom headers/cookies/user agents/Authorization, timezone and geolocation, transparent backgrounds, resizing, a chosen cache TTL, signed links for public <img> tags, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage data, and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.
Best Value
cURL
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,
)
r.raise_for_status()
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}`);
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
After saving the returned file in your site’s published image directory, reference it normally, for example <img src="shot.webp" alt="Stripe homepage screenshot">. Keep the access key on your server rather than exposing it in client-side page source. ScreenshotNeo has a free plan with 1,000 shots per month and no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan. Create a free ScreenshotNeo account.
FAQ
Does an img tag store the PNG inside the HTML file?
No. It stores a reference in src; the browser requests the PNG separately. The HTML remains small, and the image must stay available at that URL for visitors.
Can I change the visual size without editing the PNG?
Yes. Set presentation dimensions with CSS or HTML attributes while preserving the image’s aspect ratio. The file’s intrinsic pixels do not change unless you create a new image.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Why does a screenshot API response not always have a .png filename?
The response format is chosen by the request and can be PNG, JPEG, WebP, or PDF. Save it with the matching extension and reference that saved filename in your HTML.
Frequently Asked Questions
Does an img tag store the PNG inside the HTML file?
No. It stores a URL reference in src; the browser fetches the PNG separately.
Can I change the displayed size without editing the PNG?
Yes. Use CSS or width and height attributes while preserving the source image’s aspect ratio.
Why might a screenshot API response use a .webp filename instead of .png?
ScreenshotNeo can return PNG, JPEG, WebP, or PDF. Save the response with the format you requested and use that filename in your img element.
Quick Recap
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.




