title: How to get Instagram media ID from a photo link
body: <p>There are many answers here based on <a href="http://carrot.is/coding/instagram-ids" rel="nofollow noreferrer">this method</a> to convert big id to the short code. However, the big id (like 2017748900654405613_12103976679) is not included in a photo link.</p>
  
  <p>How can I get the media link</p>
  
  <blockquote>
    <p><a href="https://www.instagram.com/p/BwBRj3jgsi8/" rel="nofollow noreferrer">https://www.instagram.com/p/BwBRj3jgsi8/</a></p>
  </blockquote>
  
  <p>FROM the photo link</p>
  
  <blockquote>
    <p><a href="https://scontent-lhr3-1.cdninstagram.com/vp/f97884ced334a94f17080e60a5f99f16/5D2D32E1/t51.2885-15/e35/s1080x1080/56563284_333674164009004_273410740597618711_n.jpg?_nc_ht=scontent-lhr3-1.cdninstagram.com" rel="nofollow noreferrer">https://scontent-lhr3-1.cdninstagram.com/vp/f97884ced334a94f17080e60a5f99f16/5D2D32E1/t51.2885-15/e35/s1080x1080/56563284_333674164009004_273410740597618711_n.jpg?_nc_ht=scontent-lhr3-1.cdninstagram.com</a></p>
  </blockquote>