On your Mac
The
file: prefix fetches files relative to your disk filesystem, so these URLs map to these files:
file:///Users/Jas123/sites/index.htm -> /Users/Jas123/sites/index.html
file:///Users/Jas123/images/file_name.jpg -> /Users/Jas123/images/file_name.jpg
If you want to view the files using the real web protocol (http) then you need to move or copy the files somewhere under the document root of some webserver. On your own Mac, that would be under /Library/WebServer/Documents.
The
http: prefix fetches files relative to the web server's document root directory, so these URLs would map to these files on your Mac:
http://mymacname/sites/index.htm -> /Library/WebServer/Documents/sites/index.html
http://mymacname/images/file_name.jpg -> /Library/WebServer/Documents/images/file_name.jpg
In other words, you could see your web page and the image by going to
http://mymacname/sites/index.htm
or the shorter form
http://mymacname/sites
since index.html is the default web page name.
If you have a website
If you have a website on some shared server from an ISP, the folder you upload web pages to (often with FTP) might be named something like /users/myaccount/public_html. So that's the document root for that web server.
You would want the files to be at
/users/myaccount/public_html/sites/index.html
/users/myaccount/public_html/images/file_name.jpg
and you see the page by going to
http://mywebsite.com/sites/index.html
or
http://mywebsite.com/sites
A potential problem
With the examples above, these URLs won't work:
http://mymacname/index.html (your Mac)
http://mywebsite.com/index.html (your website)
or the equivalent short forms
http://mymacname (your Mac)
http://mywebsite.com (your website)
The reason is that to make them work you would have to put the files here:
/Library/WebServer/Documents/index.html
/Library/WebServer/images/file_name.jpg
or
/users/myaccount/public_html/index.html
/users/myaccount/images/file_name.jpg
and web servers won't let you get to a file that isn't under their document root (i.e., won't let you get to a file that isn't under /Library/WebServer/Documents or /users/myaccount/public_html). The problem is that the ".." in your <image> tag is trying to escape out of the restricted area.
How to fix it
If you want to make these URLs work:
http://mymacname/index.html
http://mywebsite.com/index.html
http://mymacname
http://mywebsite.com
then you have to take my suggestion to move the image folder to the same place as file index.html and change the image element from
<image src="../images/file_name.jpg">
to
<image src="images/file_name.jpg">