how to replace external image link with internal link

if this is inappropriate forum, please direct me to correct location.

i have recently forked jekyll theme.

_config.yml contains title_image: link
thumbnail.yml conains gravatar: title_image: link

both links are same.

i dont want external links.

i would lke to upload image and specify in _config.yml and thumbnail.yml.

what is the best way ?
how to accomplish without breaking anything ?

You should be able to replace those links with the relative or absolute links to the locations of those files on your website. If you’re trying to build a theme that is going to be used in multiple locations, the relative URL is probably going to be the best choice.

Let us know if you have more questions.

i found a solution with the github api, i don’t know why i didn’t find it earlier.
here the code in a nutshell to get the file in a git repo. after i just have to make a for loop to add href to them.

let xhr = new XMLHttpRequest();
let URL = ''"GET", URL)
  xhr.onload = function() {
    xhrjson = JSON.parse(xhr.response)
      for (let i=0; i<xhrjson.tree.length; i++) {