Images appears on localhost, but not only online server

Asked

Viewed 954 times

0

Guys I’m with the site on localhost running right, but when I upo it pro server online some images do not appear, I already uped the images, already deleted the whole site and put again, is exactly the same code, but on the site it works and the online server does not. Anyone who knows what’s going on and can help would be grateful, I’ve been trying for hours to solve the problem without success

folders="public_html img pages renatostudio inside renatostudio , the folders are: birthday marriage rehearsal Smash\

now the code:

                         <div class="iso-box aniversario col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/aniversario/5.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/aniversario/5.jpg" alt="portfolio img"></a>
                         </div>

                         <div class="iso-box html casamento col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/casamento/.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/casamento/1.jpg" alt="portfolio img"></a>
                         </div>

                         <div class="iso-box aniversario col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/aniversario/4.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/aniversario/4.jpg" alt="portfolio img"></a>
                         </div>

                         <div class="iso-box ensaio col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/ensaio/4.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/ensaio/4.jpg" alt="portfolio img"></a>
                         </div>

                          <div class="iso-box casamento col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/casamento/3.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/casamento/3.jpg" alt="portfolio img"></a>
                         </div>

                          <div class="iso-box smash col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/smash/2.jpg.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/smash/2.jpg" alt="portfolio img"></a>
                         </div>

                          <div class="iso-box smash col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/smash/11.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/smash/11.jpg" alt="portfolio img"></a>
                         </div>


                         <div class="iso-box ensaio col-lg-4 col-md-4 col-sm-6">
                            <a href="img/paginas/renatostudio/ensaio/5.jpg.jpg" data-lightbox-gallery="portfolio-gallery"><img src="img/paginas/renatostudio/ensaio/5.jpg" alt="portfolio img"></a>
                         </div>

                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

  • You need to be more specific in your question! If you used the relative path for your image urls can cause problems use google Chrome developper to debug the error.

  • Post the image code, its local folder structure, and the program you’re using to run localhost.

  • have in git? can I have a look at the code?

  • Also post errors appearing on Chrome console...

  • n I have in git but the page I am referring to you can see online: http://oatalho.com.br/renatostudio

  • Good afternoon. If you notice the code have examples like : "/2.jpg. jpg" or "/. jpg" and are not finding the images in the folder. Otherwise, when publishing your images, they were added to the project as well or to the server?

  • Make sure the images and the same folder structure is published on the server.

  • Try to put a ". /" before the img

  • two with jpg.jpg and the rest the way should be wrong even if

  • 1-Images with jpg.jpg belong to the link that js opens when you click on the image, not the image that appears. Thanks to those who noticed, I fixed but that hasn’t solved the problem yet 2-. / didn’t work :( 3-the folder structures are correct, because I’ve already deleted all server content and pass exactly the same project, and the location works and the online doesn’t.

Show 5 more comments

2 answers

0

If your index.html is in the folder public_html, just put a ./ behind img in each attribute href of your images.

  • It worked... apparently the mistake is with the photos. I don’t know why, but I recollected some without having passed through Tiny.jpg and from the 12 images, 6 appeared. I just don’t know why the hell this happens : /

0


the error was not in the code, but in the images! I don’t know pq, but dps that I passed the images on Tiny.jpg they stopped appearing on the online server, but dps that I opened in photoshop and saved again (I didn’t make any changes) they started to appear. If anyone can explain, I’d love to :)

Browser other questions tagged

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