miguel-perez / smoothState.js

Unobtrusive page transitions with jQuery.
MIT License
4.43k stars 508 forks source link

Images src appends extra paths after couple transition cycles #295

Closed sebastiangraz closed 8 years ago

sebastiangraz commented 8 years ago

Hi this issue has freaking me out a little bit because I'm at my wits end in terms of solving this problem.

What happens is, on some slower connections or throttled connections sometimes my images dont load whatsoever and get the wrong src PATH or URL, like in the title, there are some extra directories being added.

Correct url http://graz.io/images/logotypes/case-logotypes.png

Same image but incorrect url http://graz.io/case/thepoetryhour/images/logotypes/case-logotypes.png

I have the following url [link removed] where you can experience the problem

If you cycle through couple of transitions I get a 404 error on the images on the homepage (work)

Any pointers? Thank you

sebastiangraz commented 8 years ago

Okay, this has been solved. I was using a static site generator (Middleman) and the frontmatter image reference was missing a forward slash. Dumb mistake. The confusion was because the images loaded on page load anyway. Not after traversing the site. Hope this helps anyone else

from image: images/logotypes/case-logotypes.png to image: '/images/logotypes/case-logotypes.png'