HTML tutorial. Free HTML lessons for beginner developers and webmasters. Let's try to create a simple HTML website.


How to make a picture a link in html on a website

how to make a picture a link

Good afternoon. About a year ago, I wrote an article: “How to make a flash banner?” In this article I decided to continue this topic, but in a simpler form. We won’t talk about creating a banner, but simply about how to make a picture a link. For example, the picture above is a link to my affiliate course, How to Make a Movie. You can click and see how it works!

How to add a picture to a web page

First, the image must be uploaded from your computer to the site hosting, social network (VKontakte, Google+, etc.), Yandex.Disk or Google.Disk, so that the image has its own address on the Internet.

If there is a visual editor, then the sequence of actions is usually as follows:

  1. place the mouse cursor in the place where the photo should appear,
  2. click on the icon similar to or to,
  3. select a file from your computer,
  4. if possible, fill in the alternative text (aka image description).

How to upload an image to the site

Why do you need to make a link from an image?

a) For example, you have a beautiful picture of a wonderful product. You create a link from it, insert it into a specific resource. A person visits this site, sees a picture, clicks on it, and ends up in the online store where this product is located!

Convenient, I think so! The click-through rate for beautiful images is higher than for a simple mediocre link. Often they hide their affiliate links under the pictures.

b) If you have registered in any affiliate program, you have your own website, but the owner of the affiliate program has not provided the necessary advertising materials. What to do in this case?

It is enough to copy the images of his product, place the screenshot on the site, and make the picture a link. This will be something like a banner, but with less load on the site. In my opinion, it is very convenient and beautiful. Especially if you draw beautifully (or know someone who can beautifully draw a certain banner for you). You make a link from this banner image and, again, the click-through rate for this banner image increases.

c) The third reason is similar to the second. I think I won’t tell you the secret that banners significantly increase the load on the site. After all, what is someone else’s banner on your site?

This is an image located on a third-party resource that your site requests while loading one of its pages. The point here is that the time of this request can vary significantly, from a fraction of a second to several seconds.

For example, I used to have a static banner on my website from a well-known company. The banner was beautiful, with constantly changing pictures. But the point is that it greatly slowed down the loading time of the site. Loading time reached 50 seconds. That's a lot!

As soon as I removed this banner, my blog began to load many times faster (the site started loading in 1.5 seconds, not 50!)! That is, you can create a screenshot of this banner, insert a link into the screenshot and its loading time will not be a few seconds, but a fraction of a second! Although, of course, not so beautiful. It will not change, but the site loading time is more expensive!

d) I think I won't surprise the web. masters if I say that some of your banners are simply not visible to users. The browsers of such people have the “Anti-block” or “Adguard” extension installed. These extensions simply block advertising. Including some banners.

If you have an image link, the anti-block will perceive such a banner as a regular image, and without any blocking. For example, I had a “live pictures” banner running for some time, but there were few clicks on it. At first I didn’t understand what was going on, then I saw that Adguard was simply blocking it.

I went to the manufacturer’s website, took a screenshot of the part of the material I liked, created a link from the picture and the result is obvious, not a single blocker is blocking it anymore. Moreover, the copy came out even more beautiful than the original, and works great, you can see for yourself!

https://livephoto.andgin.moviesecrets.e-autopay.com

e) Another reason why it is better to make a banner out of just a picture is that search engines, especially Google, do not like it when there is a lot of advertising on the site. And they will perceive your picture link as just another image, and not as an advertisement. Comfortable? I think yes! But let's get back to the essence of our question.

Making a picture a link by creating a new post

You can add a URL with a VKontakte picture by creating and publishing a new post on your page or in a group. I'll tell you how to do this in your profile.

Log into your VK account and click on the “What’s new with you?” field.

Anything new

Next, open the desired Internet page in your browser and copy the URL from the address bar.

Copy the address

Return to the VKontakte page and paste the URL into the empty field. Hover your mouse over the image and click on the camera icon that appears.

Paste link

A window like this will open. In it, click on the “Select file” button to add an image. Please note that its size must be greater than 537x240 px, otherwise a warning message will appear.

Select a file

Through Explorer, find the desired picture on your computer, select it with the mouse and click “Open”.

Select a picture

Use the markers to select the area to be used and click Save Changes.

Select an area in the image

Remove the URL itself from the text entry field so that it does not appear in the post. Click "Submit".

Send

The selected picture will be an active link; by clicking on it, the user will be redirected to the site you specified on the Internet. All your friends will see the published note in their News.

If you need a specific person to see the link you made, or you want to add this picture to your group, then click on the speaker image under the entry.

Share button

On the “Share” tab, mark the appropriate option with a marker and click “Share post.”

If you select "Send as a private message", then you need to specify the users from your friends list to whom it will be sent. You can select one or more people.

If you want to add a post you made to a group, select your group from the list.

Share post

This is what a post with a link picture that you shared looks like on the group wall.

New post with link

How to make an image a link in the sidebar

This is done quite simply. I will give the construction of such an image with a link:

alt="" />

In the link address we insert the entire link, with https:// and other things (although this is not always necessary, but don’t worry about this). The same applies to the image address.

How to find the address of your image? Click on it and you will see your link in a new window at the top. Or, by logging into the admin panel, select “Media” - “Library” and view all your images on the site.

Find what you need, click on the link above, and view the link.

link to live photos

Also, I would like to add that if you want your picture to open in a new tab, it is advisable to add target="_blank" to this code.

Accordingly, our code will take the form.

<a href=»адрес ссылочки» target=»_blank»>a></a>

Images on blogs are most often found in the /wp-content/uploads/ or /images/ folders.

Essentially, the above code is ready to be inserted into your sidebars. You can make it in the center, placing it between the tags

..., or code

As you can see, everything is quite simple.

I advise you to read: - How to make money on the Internet 36 ways and

How to find out the address of a picture and copy it

There are several ways to copy the image address:

  1. Place the cursor over the photo, click on the right mouse button, in the context menu that appears you will be asked to copy the URL, click on the required item.

    If you hover over the photo and click on the right mouse button, a context menu with the following items will open in Mozilla Firefox

  2. Place the cursor over the photo, click on the right mouse button, in the context menu that appears you will be asked to study the characteristics of the photo, click on the required item (in Fig. 1, see the “Image Information” item; in Internet Explorer, see the “Properties” item), in the window that opens, select the address of the picture,
      Right-click on the mouse and click on “Copy” in the context menu that appears.
  3. press the keyboard shortcut Ctrl+C.
  4. Image information in Mozilla Firefox

  5. Place the cursor over the photo, click on the right mouse button, in the context menu that appears you will be asked to go to the picture page, click on the required item (in Fig. 1, see the “Open image” item). A page will open containing only one image. Full height if it was previously reduced using the height and width attributes or using CSS. Select the address of the page that opens in the address bar of the browser,
      Click on the right mouse button and select “Copy” in the context menu that appears.
  6. press the keyboard shortcut Ctrl+C.
  7. This is what a picture page looks like, in this case an emoticon

  8. On touch devices (smartphone, tablet), hold your finger over the photo for a long time without moving; in the context menu that appears, you will be asked to go to the picture page, click on the required item (it may be called “View picture”). A page will open containing only one image. Full height if it was previously reduced using the height and width attributes or using CSS. Then long press on the address in the browser address bar. After the sliders appear and the entire URL is selected (if necessary, the sliders can be moved to the required distance), click the “Copy” button in the appeared panel.
  9. Place the cursor over the photo, click on the right mouse button, in the context menu that appears you will be asked to go to the background image page, click on the required item. A page will open containing only one image. Full height if it was previously reduced using CSS. Select the address of the page that opens in the address bar of the browser (see Fig. 3),
      Click on the right mouse button and select “Copy” in the context menu that appears.
  10. press the keyboard shortcut Ctrl+C.
  11. Go to the background image page in Mozilla Firefox

  12. From the source code of the site page.
Rating
( 2 ratings, average 5 out of 5 )
Did you like the article? Share with friends: