How to link an image with WordPress
You can link images in your wordpress posts or pages to any URL or file. You might want to link to another website or you might want to link to a PDF or other file you have on your site. This short tutorial will show you how to do both.
First, we are going to link an image to another website.
- Go to the post or page you’d like to insert a linked image.
- Place your cursor and select the “add image” button.
- From here we are going to concentrate on the “Link URL” section.
- Right now you’ll notice that the link URL area is populated with the absolute path of the image we have chosen. If you choose “none” your image will not link to anything when clicked. If you choose “file URL” it will link to the original image you’ve uploaded in it’s original size. If you select the Post URL, it will link to the post or page that the image located in.
- We want this image to link to another website. So, we are going to replace the link with our own.
- Copy the URL to the page you want to link to and go back to my “Add an image” area and paste that URL into the “Link URL” area.
- Select “insert into post”.
- If you click “preview changes” you will see what the page will actually look like and test it to make sure it goes where I want to.
Next, we are going to take the same image and link it to a PDF file.
- First we need to upload a PDF.
- You can place your cursor anywhere because we aren’t actually going to place it. We just want to upload it to WordPress.
- Select the “Add Media” button and find and upload your PDF file the same way you did your image earlier.
- This time, you want to click the “file URL” button. When you do, you’ll see that the link to the file will be populated in the space above. Copy that URL and close the window.
- Now, click on the image that you want to link the PDF to and select the “Edit Image” button.
- Where the Link URL appears, paste the URL of the PDF that we just copied.
- Now, click Update.
- Preview the page again to see your changes. When you click the photo it should bring up the PDF that you linked to it.