What it means to turn an image into a link

When you turn an image into a link, you are wrapping the image file in code so that clicking on it takes you somewhere else — to a website, an email address, or another file on your computer. The image itself does not change. What changes is what happens when someone clicks it.

This is useful when you are organizing files and want a visual way to navigate between them. Instead of a folder full of text shortcuts, you can create a folder with thumbnail images that link to the actual files or folders you use most. It works the same way on a website: the image looks normal, but it behaves like a button.

Key Takeaways

  • The simplest method is to use HTML code: wrap your image file name in an anchor tag that points to the destination file or web address.
  • If you are building a web page, you can use a website builder like Wix or Squarespace, which let you click and drag to make image links without writing code.
  • On Windows, you can create a shortcut file that displays a custom image, then place it in your file folder for quick navigation.
  • The image file and the destination file can live in the same folder or different folders, as long as the path between them is correct in the code.

Using HTML code to link an image

The most direct way to turn an image into a link is to write a single line of HTML. You do not need special software — a plain text editor like Notepad (Windows) or TextEdit (Mac) works fine.

The code looks like this:

<a href="destination.html"><img src="image.jpg"></a>

Replace destination.html with the file or web address you want the image to link to. Replace image.jpg with the name of your image file. If the image and destination are in the same folder, you only need the file names. If they are in different folders, you need the full path: for example, ../images/photo.jpg or C:\Users\YourName\Documents\photo.jpg.

Save the file with a .html extension (for example, mypage.html), then open it in a web browser. The image will appear, and clicking it will take you to the destination.

Making image links in a website builder

If you are building a website and do not want to write code, website builders like Wix, Squarespace, or Google Sites let you add image links by clicking. Upload your image, then look for a link or chain icon in the toolbar. Click the image, select that icon, and paste the web address or choose a page from your site.

The builder writes the HTML for you behind the scenes. This method is faster if you are not comfortable with code, though you have less control over how the link behaves — for example, whether it opens in a new tab.

Creating a clickable image shortcut on your computer

If you want a folder on your desktop or in File Explorer to contain image thumbnails that link to your actual files, you can create a shortcut with a custom image.

On Windows: Right-click in an empty space in your folder, select New, then Shortcut. Type the full path to the file or folder you want to link to (for example, C:\Users\YourName\Documents\MyProject). Name the shortcut, then right-click it, select Properties, click Change Icon, and browse to an image file. The shortcut will now display that image as its icon.

On Mac: Create an alias by right-clicking the file or folder you want to link to, selecting Make Alias, then moving the alias to your chosen location. You cannot change the alias icon directly, but you can use a third-party tool like LUT Alias Icon Changer if you need a custom image.

Linking to different types of destinations

An image link can point to many things. A web address uses the full URL: <a href="https://www.example.com"><img src="image.jpg"></a>. A file on your computer uses the file path: <a href="file:///C:/Users/YourName/Documents/report.pdf"><img src="image.jpg"></a>. An email address uses: <a href="mailto:name@example.com"><img src="image.jpg"></a>.

You can also link to a specific location within a web page by adding a hash and anchor name: <a href="page.html#section2"><img src="image.jpg"></a>. This is useful when you have a long page and want the image to jump to a particular section.

Making sure your image links work

The most common reason an image link breaks is that the file path is wrong. If your image file is in a subfolder called images and your HTML file is in the main folder, the path should be images/photo.jpg, not just photo.jpg. If you move the image or HTML file to a different location, the link may break.

Test your link by opening the HTML file in a browser and clicking the image. If nothing happens, check that the file names match exactly (including capital letters and file extensions). If the image does not appear but the link works, the image path is wrong. If the image appears but the link does not work, the destination path is wrong.

For web pages you plan to share online, use relative paths (like images/photo.jpg) rather than absolute paths (like C:\Users\YourName\Documents\photo.jpg). Relative paths work no matter where someone saves your files on their computer.

Frequently Asked Questions

Can I make an image link without writing any code?

Yes. Website builders like Wix and Squarespace have point-and-click tools for image links. On your computer, you can create a shortcut with a custom icon in Windows, or use an alias on Mac. Both methods avoid writing code entirely.

What image file types work for links?

JPG, PNG, GIF, WebP, and SVG all work. The image format does not matter — the link code is the same. Use JPG or PNG for photographs, PNG for images with transparency, and SVG for logos or graphics that need to scale without losing quality.

Can I make an image link open in a new tab?

Yes. Add target="_blank" to the code: <a href="destination.html" target="_blank"><img src="image.jpg"></a>. This tells the browser to open the link in a new tab instead of replacing the current page.

What if I move my files to a different folder?

If you use relative paths (like images/photo.jpg), the link will still work as long as the folder structure stays the same. If you use absolute paths (like C:\Users\YourName\Documents\photo.jpg), you will need to update the code. For files you plan to move, relative paths are safer.

Can I link an image to a specific part of a long web page?

Yes. First, add an anchor to the section you want to link to: <a name="section2"></a>. Then link the image to that anchor: <a href="page.html#section2"><img src="image.jpg"></a>. Clicking the image will jump directly to that section.