WordPress images can link to a media file, an attachment page, a custom URL or nothing at all.
If an image opens the image file or an attachment page when clicked, you can remove the link from the editor.
- Log in to your WordPress admin area.
- Open Pages or Posts.
- Edit the page or post that contains the image.
- Click the image in the editor.
- Open the image link option from the block toolbar.
- Remove the link or set the link option to None, depending on the editor screen you see.
- Update the page or post.
- View the page and test the image.
If you are using the Classic Editor, click the image in the editor, choose the edit option for the image and set Link To to None.
If you want the image to open in a larger view, you may prefer to use a lightbox or media-file link instead of removing the link completely. This depends on the design of the site and the purpose of the image.