How to Make a Picture Into a Link in 2024 (Ultimate Guide)
You‘re browsing a website and see an enticing image. You click on it, hoping it will take you to more information, but – nothing happens. The image isn‘t linked.
How frustrating! When used correctly, linking images can really enhance the user experience of your site. But how exactly do you make a picture into a clickable link? And what‘s the proper way to do it?
Never fear, this ultimate guide will teach you everything you need to know about linking images in 2024. Whether you want to learn how to do it from scratch with HTML, or take the easy route with a website builder, you‘ll find step-by-step instructions here. Plus, get expert tips on image optimization, accessibility, and best practices.
By the end of this post, you‘ll be an image linking pro! Let‘s get started.
What Does It Mean to Make a Picture a Link?
First, let‘s define our terms. Making a picture or image into a "link" means that when a user clicks on the image, it acts as a hyperlink to take them to another web page. The image becomes clickable, and leads the user to a specified destination URL.
For example, clicking on a product photo could take you to a page with more details about that item. Clicking a brand logo could navigate you back to the homepage. Clicking a "Play" button graphic could open a video in a lightbox popup.
Linked images are extremely common on the web. In fact, over 35% of websites feature at least one image link on their homepage. It‘s an effective way to entice clicks and make your visual content more engaging and interactive.
Why Link Images?
There are a few key reasons to use image links on your site:
1. Boost engagement and conversions
Compelling images grab attention and draw visitors in. If they see an product photo they like or a graphic button begging to be clicked, they‘re more likely to engage – assuming the image links to something relevant. This increased interaction and click-through can ultimately boost conversions.
2. Create intuitive navigation
Picture links can point users to related resources and help them navigate your site more easily. For example, a thumbnail linking to a full blog post, or a hero image CTA button linking to a key landing page. The right visual cues make your site more user-friendly.
3. Optimize for visual searchers
Some people are more visual than textual when it comes to absorbing information. Linking images appeals to this audience and makes your site content more accessible to different user preferences. It gives visitors another way to find what they need.
4. Improve accessibility and SEO
Linking images isn‘t just for sighted users! Using descriptive alt text on image links helps visitors using screen readers understand where the link goes. This improves accessibility and user experience.
Plus, search engines like Google can‘t "see" images, but they can crawl alt text. Using keywords in image alt text and filenames boosts your SEO.
How to Make a Picture Into a Link Using HTML
Alright, now that you know the why, let‘s get into the how. The most fundamental way to create an image link is by using HTML code.
Even if you typically use a website builder (more on that later), it‘s good to know how image links work under the hood. This empowers you to customize them further if needed.
Follow these steps to link an image with HTML:
1. Upload your image
Start by uploading the image you want to use to your website‘s server or hosting platform. Many websites have a Media Library where you can store uploaded assets.
Make sure to optimize your image for web usage before uploading. Use a compressed file format like JPG or WebP, and keep the file size under 200 KB if possible for fast loading. We‘ll discuss more image optimization tips later.
2. Copy the image URL
Once your image is uploaded, you need to get its URL in order to link it. In your Media Library or file manager, right-click the image and select "Copy Link Address" or "Copy URL".
The full URL should look something like this:
https://www.mysite.com/wp-content/uploads/cute-puppy.jpg
Keep this handy for the next step.
3. Add the HTML link code
To actually turn the image into a link, you‘ll need to add some HTML. In the code editor for the page where you want the image link to appear:
- Type
<a href="">to begin the link tag. This stands for "anchor." - Paste your image URL between the quotation marks after
href= - Type
><img src=""to begin the image tag nested inside the link. - Paste your image URL again between the quotes after
src= - Type
alt=""to add alternative text for the image - Type a brief description of the image between the quotes, for example
alt="cute puppy" - Close the image tag with
>and the link tag with</a>
Here‘s how the full HTML code should look:
<a href="https://www.mysite.com/wp-content/uploads/cute-puppy.jpg"><img src="https://www.mysite.com/wp-content/uploads/cute-puppy.jpg" alt="cute puppy"></a>
4. Specify the link destination
The finishing touch is to specify where you want the image link to point to when clicked. Simply replace the image URL in the href="" portion with the desired page URL.
For example, to link the puppy pic to a page about adopting a dog:
<a href="https://www.mysite.com/adopt"><img src="https://www.mysite.com/wp-content/uploads/cute-puppy.jpg" alt="cute puppy"></a>
That‘s it! Your image should now be clickable and linked.
How to Link Images in WordPress, Wix, Squarespace, Etc.
I know, I know – mucking around in HTML isn‘t everyone‘s cup of tea. Luckily, most popular website builders and content management systems (CMS) make linking images a breeze. No coding required!
While the specifics vary a bit, the general process is:
- Upload your image or add it to a page
- Click on the image to select it
- Click the "Link" icon in the toolbar (it often looks like a chain link)
- Paste in the destination URL you want the image to link to
- Click "Apply" or "Insert" to add the link
For example, in WordPress‘s Gutenberg editor:
- Click the plus sign to add an Image block
- Upload your image or select it from the Media Library
- Once the image is inserted, click on it
- Paste the link destination URL into the "Link To" field of the Block sidebar
- Click the "Apply" button to save
Similarly, in Squarespace:
- Drag and drop an Image Block into your page
- Upload your image or select an existing one
- Click on the image to bring up the editing toolbar
- Click the "Link" icon
- Enter your link destination URL
- Click "Apply"
The beauty of using a website builder is that you can add, remove, and change image links visually without touching any code. Play around with the options in your builder of choice to master image linking!
Tips for Optimizing Images to Use as Links
For your image links to be effective, the images themselves need to be optimized. Here are some tips:
Choose the right file format
- For photographs, use JPEG. It has good compression to keep file sizes down.
- For graphics, logos and illustrations, use PNG or SVG. They maintain quality.
- For hero images and backgrounds, consider WebP. It‘s a modern format with superior compression.
Reduce the file size
- Keep images under 200 KB for fast page loading
- Resize the image to the exact dimensions needed (avoid scaling up!)
- Use a tool like TinyPNG, ImageOptim or Kraken.io to compress images without losing quality
Use descriptive names and alt text
- Name your image files something logical like "red-dress.jpg" instead of "IMG_398.jpg"
- Always include alt text that describes what‘s in the image
- If appropriate, use target keywords in the filename and alt text for SEO
Maintain accessibility
- Choose images that have adequate color contrast
- Avoid using images of text, which can‘t be read by screen readers
- If you do use text graphics, repeat the words in the alt text
Make it clear images are clickable
- Use conventional "button" graphics for calls-to-action
- Style photos as cards with hover effects to invite clicking
- Place images in typical link locations like navigation and sidebars
- Use arrows, underlines or "Click here" microcopy when appropriate
Best Practices for Linking Images
Finally, here are some general best practices to follow when linking images:
Link to relevant pages
The destination of an image link should be clearly related to the image content. For example, a product photo should link to that product‘s detail page, not an unrelated category page.
Use unique links
Avoid linking multiple different images to the same URL. This is confusing. Instead, take users directly to the most relevant, specific page based on the image they click.
Set links to open in a new tab
Especially for links that navigate users away from your site, set the target to "_blank" so the link opens in a new browser tab. That way, users don‘t lose their place on your site.
You can add target="_blank" to the link HTML like this:
<a href="https://www.mysite.com/adopt" target="_blank"><img src="https://www.mysite.com/wp-content/uploads/cute-puppy.jpg" alt="cute puppy"></a>
In most website builders, there‘s a checkbox in the link options to "Open in new tab".
Prioritize the user experience
Don‘t go overboard with image links to the point that it‘s overwhelming or confusing. Only link images when it will help the user, not just for the sake of it.
Ensure all of your linked images contribute to an intuitive, accessible user flow through your content. Combine linked images with regular text links and navigation for the best experience.
Wrapping Up
I hope you now feel confident in making pictures into links! Whether through HTML code or a visual website builder, you‘ve got the steps and knowledge needed to boost the power of your visual content.
Just remember:
- Optimize images beforehand so they load quickly and look their best
- Link images to relevant, specific destination URLs
- Use informative alt text and filenames for accessibility and SEO
- Follow general best practices and put user experience first
By thoughtfully implementing image links, your website will become more engaging, intuitive and conversion-friendly. You‘ve got the tools – now go turn those pictures into clickable portals!
