Image adress problem

Hi everyone! I want to put picture in my web page but the img src is too long. How i can get rid of that? I want it like in web tutorial where I can put image easily without need to paste image adrees that is too long. Is my problem have solution?

If you’re writing your code locally then:

You can download the image, rename it and use it locally.

For example, you can save the image in the images folder.
If your folder structure is like this:

my-project/
   index.html
   styles.css
   images/
      photo.jpg

then, inside index.html, you can insert your image using:

<img src="./images/photo.jpg">

If you’re writing your code on freeCodeCamp then you can download the image and reupload it to Imgur to make the image link shorter.

To get the link of a image on Imgur, right-click on the image and select “Copy Image Link”.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.