ScreenshotNeo

BlogHow-to

How to Get a URL for a PNG Image

Learn how to turn a local PNG into a direct image URL, choose the right host, preserve quality, and fix common sharing-link problems.

By the ScreenshotNeo team1 October 20266 min read

A PNG stored on your computer does not have a public URL yet. Upload it to an image host or cloud-storage service, set the required access permission, then copy the image’s direct address (or a share link if a human only needs to view or download it).

First decide what the destination needs:

  • Image resource URL: a URL that returns the PNG bytes and can be used in an <img src>, CSS, Markdown image, or API field.
  • Share link: a page or file link that opens a viewer. This is suitable for people, but some embeds reject it.

1. Get a direct PNG URL with an image host

Imgur workflow

  1. Open Imgur Help and start a new post or upload.
  2. Select or drag in the PNG.
  3. Open the page for the individual image, rather than copying the post page.
  4. On desktop, right-click the image and choose Copy image address. On mobile, use the image or video menu (or long-press) and copy the image address.
  5. Paste the result into a private browser window. A direct URL should display the image itself, without an Imgur viewer around it.

Imgur says uploaded content can be located with a direct URL. Its documented limits are service-specific: non-animated images can be up to 50 MB, PNGs over 5 MB may be converted to JPEG, and larger anonymous or account uploads may be lossily compressed. If transparency or byte-for-byte fidelity matters, download the hosted result and verify it before using the link.

Check whether a URL is really an image

curl -I -L "https://example.com/path/image.png"

Look for a successful status (usually 200) and an image content type such as image/png. A URL ending in .png is only a hint; servers can return HTML, a redirect, or a login page regardless of the extension.

python - <<'PY'
import requests

url = "https://example.com/path/image.png"
r = requests.get(url, allow_redirects=True, timeout=30)
print("status:", r.status_code)
print("content-type:", r.headers.get("content-type"))
print("bytes:", len(r.content))
PY
node - <<'JS'
const url = 'https://example.com/path/image.png';
const res = await fetch(url, { redirect: 'follow' });
console.log('status:', res.status);
console.log('content-type:', res.headers.get('content-type'));
console.log('bytes:', (await res.arrayBuffer()).byteLength);
JS
  1. Upload the PNG to Google Drive.
  2. Open the file’s sharing settings.
  3. Under General access, choose Anyone with the link and select the least-permissive role that works.
  4. Copy the link and test it in a private window.

Drive’s copied link is a file-sharing link. It may open a preview page rather than return PNG bytes, so do not assume it is valid for an <img> element or an API that expects an image resource. Google also notes that recipients can see the file owner’s name and email; review that exposure before making a file broadly accessible. See Google Drive Help for the current sharing controls.

  1. Upload the PNG to Dropbox.
  2. Choose Share for the file or folder.
  3. Create a link and set the access options you need.
  4. Open the link while signed out to confirm that the intended audience can use it.

Dropbox documents links for sharing files with people who do not have Dropbox accounts. Treat the result as a shared-file link unless you have confirmed that the destination accepts it as a direct image resource. Current controls are documented in Dropbox sharing help.

If the image is already represented in Google Images, open the image result and use its Share action to copy the URL. Google documents a https://share.google/ link for this flow. That link shares the found image result; it is different from uploading a local PNG and hosting it yourself. Test it in the destination before depending on it.

5. Direct URL or sharing URL?

Need Use What to verify
Embed with <img src>, CSS, Markdown, or an API Direct image URL Unauthenticated request returns image/png and the expected bytes
Let a person view or download the file Drive, Dropbox, or host share link Permission, sign-in requirement, and viewer behavior
Preserve transparency and original data A host that does not transform the file Downloaded format, dimensions, alpha channel, and checksum
Keep the file private Permission-controlled storage Only intended accounts can open it; links are not forwarded publicly

6. Verify the hosted file before publishing it

curl -fL "https://example.com/path/image.png" -o downloaded.png
file downloaded.png
sha256sum downloaded.png

Compare dimensions and transparency with the original. A successful download alone does not prove that the host preserved PNG format. Also check redirects, hotlink protection, expiration, and rate limits if the URL will be used by a production site.

7. Troubleshooting

You copied a post or viewer URL. Open the individual image and use an image-address action, or use the host’s documented direct-link option.

The embed shows a broken image

Request the URL with curl -I -L. Fix permissions, authentication, redirects, or a non-image Content-Type. Some destinations block hotlinking even when a browser tab can display the file.

The recipient gets “access denied”

The file is private or restricted to an account. Change access to the intended audience, or use a service that supports the required public or signed-link model. Re-test while signed out.

The PNG became a JPEG or lost transparency

The host transformed or compressed it. Imgur documents conversion of PNGs over 5 MB and other compression limits. Upload a smaller file, use a workflow that preserves PNG, or verify the hosted output before publishing.

The URL works for me but not for users

Your browser may have a saved login, cookie, or permission. Test in an incognito window and from a separate network. Check whether the link expires or requires a referrer.

The image is unexpectedly public

Anyone-with-link and public image hosts are designed for broad access. Remove the upload, revoke the link, or move the file to permission-controlled storage. Do not place secrets or personal documents in a public image URL.

8. Performance, reliability, and cost considerations

  • Cache the final URL in your application when the image is immutable. Repeated downloads add latency and bandwidth use.
  • Keep files reasonably sized. Large PNGs slow page loads; consider an appropriately sized derivative while retaining the original privately.
  • Plan for link changes. Provider policies, deleted accounts, expired shares, and moved files can invalidate URLs. Store the provider, object identifier, and original checksum with the link.
  • Check licensing and privacy. A public URL grants access to anyone who obtains it. Remove metadata if it reveals information you do not intend to publish.
  • Confirm destination compatibility. Some systems require HTTPS, reject redirects, or require the response to be an image rather than an HTML preview.

Or skip the browser setup

If what you really need is a URL to a rendered web page image, ScreenshotNeo returns a screenshot from one GET request. It is useful when the source is a web page rather than a local PNG; save the returned bytes, then host that file wherever your destination requires a public image URL.

See the ScreenshotNeo API documentation for options.

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)
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}`);

Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

FAQ

Can I make a local PNG URL without uploading it?

No. A remote service needs a network-accessible copy. You can use a temporary local server for development, but production recipients need hosting or storage.

Usually it is a sharing or preview link. Treat it as a file link unless you verify that an unauthenticated request returns PNG bytes.

Will a direct URL always end in .png?

No. The response headers and bytes determine the actual resource. Validate the URL instead of relying on its filename.

How do I keep the PNG private?

Use permission-controlled storage and authenticated access. A public image-host URL or anyone-with-link setting should be considered public.