To add a media file to your page or post using the Classic Editor, click on the “Add Media” button, and choose an existing file or upload a new one:
The anchor and link will automatically be generated by the Editor. From here, you can click on the link and then click on the pencil icon to edit the anchor text or the link URL as needed.