Wrap the JPG’s <img> element in an <a> element. Put the destination in href, the image file in src, and a useful action or destination description in alt:
<a href="https://example.com/gallery">
<img src="images/photo.jpg" alt="Open the photo gallery">
</a>
The whole image then behaves as a link. The JPG file itself is not interactive; the surrounding HTML anchor supplies the click behavior.
The basic clickable-JPG pattern
An image link has two nested elements: an anchor (<a>) on the outside and an image (<img>) inside it. The browser uses the anchor’s href as the destination whenever the linked image is clicked or activated with the keyboard.
<a href="https://example.com/gallery">
<img src="images/photo.jpg" alt="Open the photo gallery">
</a>
Keep the opening and closing anchor tags around the image. Placing the two tags beside each other does not make the image clickable.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- USB-C 2-in-1 storage OTG: The Lexar JumpDrive Dual Drive D40E features USB Type-A and Type-C connectors in a slim, portable form factor for easy device compatibility
- Transfer speeds up to 100MB/s: Based on internal testing, performance may vary depending upon the host device, interface, and usage conditions. 1MB=1,000,000 bytes
- Plug and Play: Widely compatible with USB Type-C smartphones, tablets, laptops, Macs, and traditional Type-A devices, no software installation required. The 360° swivel design allows for easy switching between connectors without the hassle of losing a cap
- Durable & Compact: The Lexar D40E USB memory stick features a metal enclosure, withstands temperatures from 0° to 50° C (32°F to 122°F), and is lightweight at 26g with dimensions of 70.4 x 16.9 x 11.7mm
- Security & Warranty: Securely protects files using an advanced security software solution with 256-bit AES encryption. Backed by a Lexar 3-year limited warranty
What each attribute does
| Part | Purpose | Example |
|---|---|---|
href on <a> |
Sets the page, file, URL, or fragment opened by the link. | /gallery/index.html |
src on <img> |
Identifies the JPG displayed inside the link. | images/photo.jpg |
alt on <img> |
Provides the accessible name when the image cannot be seen or loaded. | View the conference schedule |
href and src are independent. You can display a thumbnail from one path and send the visitor to a different page or full-size file.
Choose the destination you need
Link to another page on the same site
Use a site-relative path when the destination belongs to the same website. The leading slash starts at the site root.
<a href="/about.html">
<img src="team.jpg" alt="Read about our team">
</a>
A path without a leading slash is relative to the current document’s folder, so gallery.html and gallery/index.html resolve from that location.
Link to an external website
An absolute HTTPS URL works for another domain:
<a href="https://developer.mozilla.org/">
<img src="mdn-logo.jpg" alt="Visit MDN Web Docs">
</a>
Describe the external destination in the alternative text rather than using a vague label such as “image.”
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteOpen the full-size JPG
Use a smaller thumbnail in src and the large file in href:
Rank #2
- High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
- Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
- Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
- Sleek, durable metal casing
- Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]
<a href="images/photo-large.jpg">
<img src="images/photo-thumb.jpg" alt="View the full-size photo">
</a>
This is useful for galleries because the page initially loads a lighter image while the click opens the original.
Jump to a section on the current page
A fragment identifier in href scrolls to the element whose id matches it:
<a href="#details">
<img src="photo.jpg" alt="Jump to photo details">
</a>
<section id="details">
<h2>Photo details</h2>
</section>
Start a download
Point the anchor at the downloadable JPG. The server’s response headers influence whether the browser displays it or downloads it; the HTML link alone cannot force every browser to save a file.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →<a href="downloads/original-photo.jpg">
<img src="images/photo-thumb.jpg" alt="Download the original photo">
</a>
Opening the link in a new tab
Add target="_blank" only when a separate browsing context is genuinely useful. Tell users that a new tab will open in the accessible wording.
<a href="https://example.com/gallery"
target="_blank"
rel="noopener">
<img src="photo.jpg" alt="Open the gallery in a new tab">
</a>
target="_blank" changes where the destination opens. The rel="noopener" value is a defensive compatibility practice for new-tab links; it is not what makes the image clickable. If you do not want a new tab, omit both attributes and let the link open normally.
Rank #3
- What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
- Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
- Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
- Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
- Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
Write accessible alternative text
When the image is the only content inside the anchor, its alt text becomes the link’s accessible name. Describe the action or destination:
alt="Open the photo gallery"tells a screen-reader user what activation does.alt="View the conference schedule"identifies the destination’s purpose.alt="Download the JPG (opens in new tab)"discloses both the action and the browsing behavior.
Avoid alt="image", alt="photo", or a filename when those words do not explain where the link goes. If nearby text already communicates the destination and the image is purely decorative, use alt="" so assistive technology does not announce the same link twice. Do not remove alt altogether.
Use a real destination in href. Values such as # and javascript:void(0) are not substitute links for actions. If the control performs an action instead of navigating, use a real <button> and add JavaScript behavior to that button.
Styling and usability details
Remove an unwanted border
Some older browser styles displayed a border around linked images. A small CSS rule keeps the presentation consistent:
a img {
border: 0;
}
Do not remove the keyboard focus indicator from the anchor. If your design supplies its own focus style, make it clearly visible:
Rank #4
- GOOD VALUE PACKAGE - 1 Pack 32GB Memory Stick USB 2.0 Flash Drives with great cost performance and high quality.
- BIG CAPACITY - The available capacity: 29.10GB-29.8GB, You can save the data of movies, music, photos, designs, programs, manuals, handouts in a high speed.Good performance in digital data storing, transferring and sharing with families, friends, workmates, clients and machines.
- EASY TO USE & PLUG AND WORK - Support windows 7 / 8 / 10 / Vista / XP / 2000 / ME / NT Linux and Mac OS, Compatible with USB2.0 and below.
- TWISTTURN DESIGN & EASY CARRY - The metal clip rotates 360° round the ABS plastic body which with rubber oil skin feeling finish. The capless design can avoid lossing of cap, and providing efficient protection to the USB port.
- WARRANTY & SUPPORT - SIMMAX logo is laser printed on the USB connector surface, our products are of good quality and we promise that any problem about the product within one year since you buy.
a:focus-visible {
outline: 3px solid #1a73e8;
outline-offset: 3px;
}
Make the target comfortable on touch screens
Keep the linked image large enough to activate without accidentally hitting a neighboring control. When the design permits, add spacing around adjacent links and avoid tightly packed thumbnails.
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 matchControl image dimensions without breaking the link
CSS changes the displayed size; it does not change the clickable relationship:
.gallery-thumb {
display: block;
max-width: 100%;
height: auto;
}
<a href="images/photo-large.jpg">
<img class="gallery-thumb" src="images/photo-thumb.jpg" alt="View the full-size photo">
</a>
Keeping the image responsive prevents overflow on narrow screens while leaving the full anchor area active.
Complete examples
A local gallery card
<article>
<a href="/gallery/summer.html">
<img src="/images/summer-thumb.jpg" alt="Open the summer photo gallery">
</a>
<h2>Summer gallery</h2>
</article>
An external logo link
<a href="https://developer.mozilla.org/" target="_blank" rel="noopener">
<img src="images/mdn-logo.jpg" alt="Visit MDN Web Docs in a new tab">
</a>
A thumbnail that opens the original file
<figure>
<a href="images/landscape-original.jpg">
<img src="images/landscape-thumb.jpg" alt="View the full-size landscape photo">
</a>
<figcaption>Mountain landscape</figcaption>
</figure>
Common mistakes and fixes
- The image is not clickable: Check that
<img>is actually between the opening and closing<a>tags and that no overlay element is covering it. - The wrong page opens: Inspect
hreffor a spelling, slash, protocol, or filename error. Relative paths are resolved from the current document’s folder. - The image is broken: Verify the
srcpath, filename capitalization, extension, and server location. A broken image can still have an anchor around it, but visitors cannot see the intended target. - The link opens a blank or unexpected tab: Remove
target="_blank"if a new tab is not intended, and check that the destination URL is complete. - Screen readers announce an unhelpful link: Replace generic
alttext with the destination or action. If visible text already names the destination and the image is redundant, usealt="". - A fake link does nothing: Replace
href="#"orjavascript:void(0)with a real URL, or use a button for an in-page action. - Keyboard users cannot tell where they are: Restore the anchor’s focus outline or provide a high-contrast
:focus-visiblestyle.
Test the image link before publishing
- Load the page and click the visible JPG, not just nearby text.
- Activate the same link with the keyboard: tab to it and press Enter.
- Confirm the final URL, fragment, or downloaded file is the one specified by
href. - Resize the viewport and check that the image remains visible and comfortably clickable.
- Temporarily block or rename the JPG and verify that the alternative text still explains the destination.
- If using a new tab, confirm that the accessible wording tells users what will happen.
Or skip the browser setup:
If your goal is to generate a clean screenshot of a page rather than hand-build a browser capture workflow, ScreenshotNeo provides a website screenshot API and MCP server. It is separate from the HTML link itself: use the anchor pattern above when you need a clickable JPG on your site, and use ScreenshotNeo when you need an image or PDF capture of a URL.
A single GET request can capture a page. The API accepts the URL and returns PNG, JPEG, WebP, or PDF output. Its cleanup step accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. 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.
See the ScreenshotNeo documentation for the full parameter list. This is a runnable cURL example:
Best Value
- 【16GB Flash Drive】USB flash drives with 16GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer. IMEASON thumb drives can be used to store different files, easy to data backup.
- 【Metal Swivel Cap Design】USB thumb drive is metal swivel cover provides extra protection for the usb thumbdrive connector, no usb drive cap to lose; keychain design makes it easier to carry without worrying lose it.
- 【Wide Compatibility】USB drive supports Windows 7/8/10/11 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also Supports USB 2.0 and 1.1 ports. USB Stick support TV, desktop, notebook computer, car, audio and other device. The USB Memory Stick is your great data storage and transfer companion with traveling and working.
- 【Easy to use】usb memory stick is plug and play without any software installation. Just simply plug the Flashdrive into the port of your USB-compatible devices such as computer, laptop to start data storage or transmission.
- 【What You Get】16 GB USB Flash Drive Thumb Drive, The default format of the usb storage flash drive is FAT32.
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}`);
For AI workflows, its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots each month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free plan if that capture workflow is what you need.
Frequently asked questions
Can I make only part of a JPG clickable?
Not with a single ordinary anchor around the image. Use separate image slices or an image-map technique when different regions must lead to different destinations; otherwise link the complete image.
Does the JPG format affect whether the link works?
No. The browser applies the anchor behavior to the image element regardless of whether the file is JPG, PNG, WebP, or another supported format. The file must still load correctly through src.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Should I put visible text inside the anchor too?
You can. If the text and image communicate the same destination, keep the image’s alt empty to avoid repeating the link name to screen readers. If the image carries the only meaningful label, give it descriptive alternative text.
Frequently Asked Questions
Can I make only part of a JPG clickable?
Not with one ordinary anchor around the image. Use separate linked elements or an image-map approach when regions need different destinations.
Does the JPG format affect whether the link works?
No. The anchor works with JPG and other supported image formats; the file must simply load from the src path.
Should visible text and the image share one link?
They may. When both convey the same destination, use alt="" on the redundant image so assistive technology does not announce the link twice.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.




