In older WordPress editor (non Gutenerbg editor) adding link to an image was quickly visible. No doubt the block editor is great, but the option to add a link to image block is somewhat hidden in the toolbar.
- Click on the image block, you will see a toolbar. The block toolbar can be just above the block or look on top of your screen to locate the same.
- In that toolbar you can click on the link icon and add/apply a link to the image.
- You can link the image to any existing page/post on your site or to any external link.
- If you want to link it simply to the same image then you need to choose “Media File” option
- In case you want to link it to it’s own page where users can comment or see it on the website then you need to choose “Attachment Page” option
- Using a small dropdown in the link panel, you can also set whether the link should open in a new tab and if you want to set any custom css class. By default the link will open in the same tab.