The images you are referring to are in content images i.e they are inserted in to the post via the media upload on the edit screen.
When uploading the images if you have a look at the bottom right corner of the upload media window you’ll see the “Link to” dropdown box. Select the custom url and if you already know the permalink then insert in the text box below it – if you don’t know the permalink yet leave it blank and you can then edit to add it in afterwards.
Hope that helps.
For reference, the images you compared to which link to the post itself – those are post thumbnails otherwise known as featured images and depending on the theme these would link to the actual post 🙂