Server blocks image

Asked

Viewed 128 times

0

I developed a website where it doesn’t carry an image. Insert the following into the HTML code:

<img src="repositorio/imagem_principal/140800039.jpg">

However, the image does not appear when loading the HTML page on which this code is. The only way it appears is to first insert the URL of this image into the browser - http://meusite.com.br/repositorio/imagem_principal/140800039.jpg (thus downloading to my cache).
That way, when I refresh the HTML there yes the image appears.

Some important information:
When I developed the site I was using a Locaweb server (works perfectly).
When I migrated the site to the official client server (Hostgator) presented this problem.

Does anyone have any tips to solve this impasse?

  • has long since migrated the site?

  • 1

    Enter the normal page (containing the <img>) and then go to F12 > Console > Network and see what the error (HTTP Code) of the image is when trying to load.

  • 1

    Try adding a bar at the beginning of src before the repository, like this: <img src="/repositorio/imagem_principal/140800039.jpg">

1 answer

0

Just like Vanildo said, try adding a bar to the code,

<img src="/repositorio/imagem_principal/140800039.jpg">

Or also try replacing the directory image with "/repositorio/140800039.jpg"

Check if you have not put some special character or even some "Space" always happens to me

Browser other questions tagged

You are not signed in. Login or sign up in order to post.