Cannot display an image

my html

<!doctype html>
    <script src="p5/p5.js"></script>
    <script src="p5/addons/p5.dom.js"></script>
    <script src="sketch4.js"></script>
  <body style="margin: 0; overflow: hidden;">

my sketch4.js

let img;
function preload() {
  img = loadImage('google.png');
function setup() {
  image(img, 0, 0);

when i double click my html i just get a window that says ‘loading’
my index.html and mysketch.js are in the same folder as ‘google.png’

Why am I not seeing the image?
Is there a way I can use a url instead of downloading the image first ? like so

img = loadImage(“”);

Figured it out

1)images need a server to display
2)image call needs to be made in 'function draw()