Copy an image address on a computer
- Find the picture on the web page and right-click it. On a Mac without a right button, Control-click, or click the trackpad with two fingers.
- Pick Copy image address (or your browser’s version of it, see the table below).
- Paste it where you need it with Ctrl+V, or Cmd+V on a Mac.
That’s an image URL: the web address of the picture file, not of the page it’s on. You can tell by the end. It
usually finishes with a file type such as .jpg, .png, .webp or
.svg, sometimes followed by a ? and some settings. If what you pasted ends in
.html, or looks just like the page’s address, you copied the wrong thing. The usual reason is that the
picture is also a link, and you picked Copy link address, which gives you where the link goes.
Want to know what each piece of an address means? What is a URL takes one
apart, from https:// to the file name.
What the menu says in each browser
Every browser has the option, they just word it a little differently. The second column is useful when you want to look at the image on its own first.
| Browser | Copy the address | See it on its own |
|---|---|---|
| Chrome | Copy image address | Open image in new tab |
| Edge | Copy image link | Open image in new tab |
| Firefox | Copy Image Link | Open Image in New Tab |
| Safari (Mac) | Copy Image Address | Open Image in New Tab |
| Brave, Opera | Usually the same words as Chrome, since they’re built on it | Open image in new tab |
Careful with the option right next to it. Copy image copies the picture itself, so pasting gives you a picture (in a chat or a document) and not an address. People mix the two up all the time, because they sit one line apart.
On a phone or tablet
There’s no right-click on a touch screen, so press and hold the image for a second until a menu pops up. What’s in that menu depends on the browser and changes between versions, so here’s the general idea rather than exact names.
Android
- If the menu has an option that copies the image’s address or link, tap it and you’re done.
- If it only offers Copy image, that copies the picture, not its address. Tap Open image in new tab instead, switch to that tab, tap the address bar and copy what’s there.
- When the image is also a link, the menu shows link options too. Copy link address gives you the page the link goes to, which is often a product page, not the photo.
iPhone and iPad
Safari on an iPhone or iPad has no option for the address. Its menu offers things like Copy, Save to Photos and Share, and they all handle the picture itself. Two ways around it:
- Open the page in another browser on the phone. Chrome for iPhone has Open Image in New Tab in the same press-and-hold menu, and from that tab you copy the address bar.
- Open the page on a computer and right-click. If you’re going to paste the URL into code anyway, this is the easier route.
Open the image in a new tab to check it
Right-click and pick Open image in new tab. The picture shows up alone on a plain background, and the
address bar shows its URL. It’s the quickest way to check two things: that you’ve got the image and not the page,
and how big the file really is (many browsers show the size in pixels in the tab title, for example
latte.jpg (1200×800)).
Chrome hides the https:// part in the address bar until you click it. Don’t worry, copying the address
always gives you the whole thing. The same trick works the other way round: paste an image URL into the address bar,
and if the picture appears, it will usually work in your HTML too (unless the site blocks use on other sites, see
hotlinking).
Why the image URL is long or strange
Plenty of sites don’t serve a plain photo.jpg. Here’s what the common odd addresses mean, and what
to do about each. The URL Parser helps with the long ones: paste an address and it
lists every setting after the ? on its own line.
| The address looks like | What it is |
|---|---|
https://cafe.example/img/latte.jpg?w=600&q=80 |
A normal image with settings after the ?. Many sites resize pictures on the fly, and
w=600 asks for a copy 600 pixels wide, q=80 for a little less quality. On some
sites, changing the number gets you a bigger copy. It works as it is in an img tag.
|
https://cafe.example/wp-content/uploads/2026/11/latte-300x200.jpg |
WordPress makes smaller copies of every upload and puts the size in the name. Take out
-300x200 (latte.jpg) and you usually get the full-size picture.
|
blob:https://cafe.example/9b1d4e2a-6c3f-4b8e-a1d7-2f5c8e0b3a64 | Something the page’s JavaScript put together in your browser’s memory. It only works in that tab, while the page is open, so it’s no use anywhere else. Look for the real file with Inspect or the Network panel. If the page drew the picture itself, there may be no file at all. |
data:image/png;base64,iVBORw0KGgoAAAANSUhEUg... | The picture itself, written out as text. It works in an img tag on any web page, though most email apps won’t show it, and it can run to thousands of characters. On sites that load images late, it’s often a blank placeholder and the real address sits in another attribute (see below). |
https://encrypted-tbn0.gstatic.com/images?q=tbn:... | A small thumbnail from Google Images, stored on Google’s servers. Click the result so it opens bigger in the side panel, then follow the link to the site the picture comes from and copy it there. |
https://lh3.googleusercontent.com/...=w600-h400 | A picture on Google’s servers, from places like Google Photos, Blogger or Maps. The end of the address sets the size. These links can stop working when the owner changes who can see the picture, so don’t build a website on them. |
Ends in .webp or .avif when you expected .jpg |
Newer, smaller image formats. Some sites even send one of these from an address that ends in
.jpg, depending on which browser asks. Both work in an img tag in current browsers.
|
No Copy image address option? Use Inspect
Sometimes the menu shows only page options, like Back and Save as. Then the picture isn’t a plain img tag. It may be a CSS background, or a see-through layer may sit on top of it and catch your click. The developer tools show what’s really there. Right-click the picture and choose Inspect (Safari calls it Inspect Element, and only shows it once “Show features for web developers” is ticked in Settings > Advanced). The element under your mouse is highlighted in the code.
An img tag: read the src
If the highlighted line is an img tag, the address is in src. You might see something like this:
<img src="/img/latte-600.jpg"
srcset="/img/latte-600.jpg 600w, /img/latte-1200.jpg 1200w"
sizes="(max-width: 700px) 100vw, 600px"
alt="A latte with a heart in the foam"> -
Double-click the
srcvalue to select it, then copy it. Chrome and Edge also let you right-click the address there and copy it as a link. -
srcsetlists the same picture in several sizes. The number with thewis its width in pixels, solatte-1200.jpgis the biggest one here. (When you use Copy image address on such an image, you get whichever size your browser picked for your screen.) -
/img/latte-600.jpghas no website at the start. It’s a relative address, so put the site in front:https://cafe.example/img/latte-600.jpg. Absolute and relative URLs explains why the browser can fill that in but you have to do it by hand.
A CSS background: look for url()
If the highlighted element is a div or a section, look at the styles next to the code for a
background-image line. The address is inside url(), and it may be relative too:
.hero {
background-image: url("/img/cafe-front.jpg");
} If the address is relative and the CSS sits in its own file, it’s counted from that CSS file’s folder, not the page’s. When that gets confusing, the Network panel below just gives you the full address.
A data: placeholder with data-src
Sites that load pictures only when you scroll near them often start with a tiny blank image in src
and keep the real address in another attribute, such as data-src. Their own script swaps it in later.
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACw="
data-src="/img/croissant.jpg"
class="lazy" alt="Two croissants on a plate"> Every image on the page: the Network panel
In the developer tools, open the Network tab, pick the Img filter (Images in Firefox and Safari) and reload the page.
You get a list of every picture the page downloaded, backgrounds included, each with its full address. Click one to see a
preview, or right-click it to copy the URL. This is also how you find the real file behind a blob:
address, if there is one.
Right-click blocked on a site? In Firefox, hold Shift while you right-click and the normal menu shows up
anyway. In other browsers, open the developer tools with F12 (Cmd+Option+I
on a Mac) and use the Network panel. You can also read the page’s code with
View Source and search it for .jpg or .png.
Use an image URL in HTML
Put the address in the src of an <img> tag, and describe the picture in
alt. The example below uses one of our own sample pictures, so you can copy it and it keeps working.
Change the URL to yours and the preview updates.
The example boxes are locked down: scripts are off, and your edits go away when you reload. To keep something, copy it into the HTML Editor. For everything else about the img tag (sizes, centering, captions, and what to check when a picture won’t show), see how to add an image in HTML.
The page’s address won’t work
An img tag needs the address of the picture file. Give it the address of a web page instead, even a page with that same picture on it, and you get a broken image icon with the alt text next to it:
In CSS: background-image
The same URL works in CSS, inside url(). Use it for pictures behind text, like a banner. Keep a
background-color close to the picture’s colors, so the white text stays readable while the image loads
(or if it never does).
Places that need the full URL
- Emails. A path like
images/logo.pngmeans nothing in someone’s inbox. Use the fullhttps://address, for example in the Email Signature Generator’s Image address field. - Link previews. The
og:imagetag, which sets the picture people see when your page is shared in a chat or a social app, needs a full URL. The Meta Tag Generator builds that tag. - Markdown.
shows the picture in a README or a forum post that supports Markdown.
Give your own picture a URL
A photo on your computer or phone doesn’t have a web address. It gets one when it’s stored on a web server that anyone can reach. That’s what the “image to URL” sites do: they upload your file to their server and hand you the link. htmlviewer.tech doesn’t host images, and none of our tools upload your pictures. These are the usual places to put one:
- Your own website. Put the file in a folder with the rest of the site, say
images/, and upload it the way you upload your pages. Its URL is your site’s address plus the path:https://www.yourcafe.com/images/latte.jpg. You control it, and it stays as long as your site does. - Your site builder’s or blog’s media library. Most of them have one. Upload the picture there, open it, and look for something like File URL or Copy URL (WordPress calls the button Copy URL to clipboard).
- A cloud drive, with care. A share link from a cloud drive opens a page with a viewer, buttons and sometimes a sign-in, not the file itself, so in an img tag it shows a broken picture. There are tricks that turn some share links into direct ones, but drives aren’t built to serve pictures to websites: links can hit download limits, ask visitors to sign in, or stop working after a change on their side. Fine for sending a photo to a friend, shaky for a web page.
- An image hosting service. There are lots of them, free and paid. A good one gives you a direct link
that ends in
.jpgor.png. Read the terms before you rely on one: some delete pictures that nobody looks at for a while, or block their use on other sites on free plans.
One thing to keep in mind whichever you pick: an image URL is public. Anyone who has the link can open the picture, and you can’t always take that back. Keep ID cards, documents and family photos off these services.
No upload: a data URL for small images
For a small icon or logo you can skip the server and write the picture straight into the HTML. A data URL starts
with data:, then the image type, then the picture itself. With an SVG, which is already text, you can
write it by hand. This is the SVG of a little tick:
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>
<circle cx='12' cy='12' r='11' fill='#4d7c0f'/>
<path d='M7 12.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'/>
</svg>
And here it is as a data URL inside an img tag. No file anywhere, the whole picture is in the src:
-
Encode
<as%3Cand>as%3Eto be safe, and#must become%23, or the browser cuts the address off there. The URL Encoder does it for you: paste only the SVG code and keep Type on “A value”. It encodes spaces,=and/too, which also works. - Use single quotes inside the SVG, because the
srcitself is in double quotes.
A PNG or JPG as a data URL
Photos and PNGs aren’t text, so they’re turned into base64 first: a long run of letters and numbers. Every computer can do it with one command. Open a terminal in the folder with the picture and run the line for your system. Each one copies the result to your clipboard, except the Linux one, which prints it.
base64 -i logo.png | pbcopy base64 -w 0 logo.png [Convert]::ToBase64String([IO.File]::ReadAllBytes("$PWD\logo.png")) | Set-Clipboard
Then put data:image/png;base64, in front of what you got (for a photo it’s
data:image/jpeg;base64,, with “jpeg”, not “jpg”):
<img src="data:image/png;base64,iVBORw0KGgo...the rest of the text..."
alt="Corner Cafe logo" width="64" height="64"> Keep this for small things, a few kilobytes at most. Base64 makes a file about a third bigger, the browser can’t keep one copy for every page that uses it, and a big one makes your HTML slow to load and awkward to edit. Many email apps, Gmail among them, don’t show data: images at all, so emails need a normal URL. If you have an SVG logo and need a PNG version for one of those places, SVG to PNG makes one.
Using images from other sites: hotlinking and copyright
Copying an image URL from someone else’s site and putting it in your own img tag is called hotlinking. The picture still loads from their server, every time anyone opens your page. A few things follow from that:
- They pay for the traffic your visitors cause, and many site owners don’t like that at all.
- They can block it. Then your page shows a broken image, or, on some sites, a different picture they picked for hotlinkers.
- They can move, rename or delete the file at any time, and your page breaks without you noticing.
The bigger question is whether you may use the picture at all. Being able to copy its address doesn’t give you that right. Most photos and drawings are protected by copyright from the moment they’re made, with or without a © notice. The safe routes: use your own pictures, ask the owner and keep their reply, or use images whose license allows reuse (Creative Commons licenses do, with conditions such as no commercial use) and credit the creator the way the license asks. Then save a copy on your own site and link to that.
The sample picture used on this page, https://htmlviewer.tech/samples/mountains.svg, is our own drawing, and you’re welcome to use it in
examples and tests.
Questions people ask
How do I get the URL of an image?
On a computer, right-click the image and pick Copy image address (Chrome), Copy image link (Edge), Copy Image Link (Firefox) or Copy Image Address (Safari). On a Mac without a right mouse button, Control-click, or click the trackpad with two fingers. The address is now on your clipboard, so paste it wherever you need it. To check it, choose Open image in new tab instead: the image shows on its own and its address is in the address bar.
How do I get an image URL on my phone?
Press and hold the image until a menu pops up. If there is an option that copies the image’s address or link, tap it. If the menu only has Copy image, that copies the picture itself, not its address. Then tap Open image in new tab, go to that tab and copy the address from the address bar. Safari on iPhone has no option for the address at all, so use another browser on the phone or a computer for this one.
How do I turn a picture into a URL?
A picture only gets a URL once it sits on a web server, so you have to upload it somewhere: your own website’s folder, your site builder’s or blog’s media library, or an image hosting service. Sites that call themselves “image to URL” converters are image hosts: they upload your file and give you a link. Anyone with that link can see the picture, so keep private photos off them. htmlviewer.tech doesn’t host images. For a small icon you can also skip the upload and write the image into the HTML as a data: URL.
Why does the image URL I copied start with blob:?
A blob: address points at something the page’s JavaScript made in your browser’s memory, for example an image it downloaded and unpacked itself. It only works in that one tab while the page is open, so pasting it anywhere else gives you nothing. Right-click the image and choose Inspect, or open the Network panel in the developer tools and reload, to find the real file the page downloaded. If the page drew the image itself, there may be no file with an address at all.
Why is the image URL so long?
Three common reasons. If it starts with data:image, the whole picture is written into the address as text, often a tiny placeholder shown while the real image loads. If it is on a Google address like lh3.googleusercontent.com or encrypted-tbn0.gstatic.com, it is a copy on Google’s servers, such as a Google Images thumbnail. And many sites add settings after a question mark, like ?w=600&q=80, which ask their server for a resized copy. Those long addresses still work in an img tag, but the Google thumbnail ones are small and can stop working.
Why doesn’t my Google Drive or Dropbox link work in an img tag?
A share link from a cloud drive opens a page with a viewer, buttons and a sign-in check, not the image file itself. An img tag needs the address of the file, so it shows a broken image. There are tricks that turn some share links into direct ones, but drives aren’t made to serve pictures to websites: links can hit download limits, ask visitors to sign in, or stop working later. For a web page, put the image on your website or a proper image host.
How do I use an image URL in HTML?
Paste it into the src of an img tag and describe the picture in alt: <img src="https://htmlviewer.tech/samples/mountains.svg" alt="Mountains and a lake at sunset" width="240" height="150">. For a picture behind text, use CSS instead: background-image: url("https://htmlviewer.tech/samples/mountains.svg");. In emails and social share tags, always use the full address starting with https://.
Can I use any image URL I find on my website?
Not without permission. Being able to copy an image’s address doesn’t mean you may use the picture: most images are protected by copyright even when there is no © notice. Using the other site’s URL directly (hotlinking) also makes their server pay for every visit to your page, and they can block it or swap the picture at any time. Ask the owner, use your own photos, or use images whose license allows it, then save a copy to your own site and credit the creator the way the license asks.
Why is there no Copy image address option when I right-click?
Usually the picture isn’t an img tag. It may be a CSS background image, or there may be a see-through layer on top of it, so your click lands on something else. Some sites also block the right-click menu. Right-click and choose Inspect: the developer tools show the element under your mouse, and the image address is in its src or in a background-image line in the styles. In Firefox, holding Shift while you right-click shows the normal menu even on sites that block it.
Keep going
Tools that help
- URL Parser Paste a long image URL and see its parts, size settings after the ? included.
- URL Encoder & Decoder Encodes the characters an SVG needs before it goes into a data: URL.
- SVG to PNG Turns an SVG into a PNG file, for places that don’t take SVG.
- HTML Editor Paste an img tag with your URL and see it right away.
More tutorials
- How to Center Text, a Div or an Image in HTML & CSS
- How to Add a Line Break in HTML
- How to Add Spaces in HTML
- How to Change Text Color in HTML
- How to Change Background Color in HTML
- How to Add an Image in HTML
- What Is a URL? Meaning, Parts and Examples
- How to Redirect a Page in HTML
- Canonical URL
- What Is HTML? What It Stands For and How It Works
- How to Create, Open and Run an HTML File
- How to Link CSS to HTML
- How to See the HTML Code of a Website
- How to Link JavaScript to HTML with the script Tag
- HTML hr Tag
- HTML Comments
- How to Make Text Bold in HTML
- HTML Font and Font Size
- All tutorials