Infinite Scroll – How to Remove the Noticeable Cut at the Loop End

https://codepen.io/Redcaus12345/pen/EaYqEdE How can I make the end of the loop smoother? There's a noticeable cut or restart that doesn't look seamless. Any tips or suggestions ?
jog
CodePen
Untitled
...
47 Replies
Chris Bolson
Chris Bolson2mo ago
When calculating the container width maybe you should also take into account the gap between each image
redcaus1235
redcaus1235OP2mo ago
it worked but somehow the first image always needs to load
ἔρως
ἔρως2mo ago
set it as high priority
redcaus1235
redcaus1235OP2mo ago
with js ?
ἔρως
ἔρως2mo ago
no, with html
redcaus1235
redcaus1235OP2mo ago
how <img src="bl1.jpg" alt="image 1" loading="eager" fetchpriority="high">
ἔρως
ἔρως2mo ago
ypu, like that
redcaus1235
redcaus1235OP2mo ago
still doesnt work
ἔρως
ἔρως2mo ago
save the space for it then
redcaus1235
redcaus1235OP2mo ago
it takes like 2-4 seconds to load still
ἔρως
ἔρως2mo ago
yeah, that's bad no image should take that long
redcaus1235
redcaus1235OP2mo ago
just the first img if i change the img to another img it still needs to load
redcaus1235
redcaus1235OP2mo ago
nah on vscode i am using diffrent img on codepen it doesnt lag just on liveserver
ἔρως
ἔρως2mo ago
can you show the size of the image?
redcaus1235
redcaus1235OP2mo ago
width: 700px; all img have 700px
ἔρως
ἔρως2mo ago
is that the actual size of the image? or just the css size?
redcaus1235
redcaus1235OP2mo ago
css size
ἔρως
ἔρως2mo ago
what's the actual size of the image?
ἔρως
ἔρως2mo ago
i can imagine it taking quite a long time to load them all
redcaus1235
redcaus1235OP2mo ago
but all loading normal only the first img is loading behinf
ἔρως
ἔρως2mo ago
you should convert it to avif
No description
redcaus1235
redcaus1235OP2mo ago
No description
redcaus1235
redcaus1235OP2mo ago
Here the two make a problem I put lazy just as a test
ἔρως
ἔρως2mo ago
show me the network tab in the developer tools
redcaus1235
redcaus1235OP2mo ago
This one never used it before
No description
ἔρως
ἔρως2mo ago
but show everything that's loaded, not just a single file
redcaus1235
redcaus1235OP2mo ago
That’s all There is nothing else loading
ἔρως
ἔρως2mo ago
there has to be, or you wouldn't have a site the fact that a css file loaded means that there is html too or you accessed the file directly so, make sure it is set to show all files
redcaus1235
redcaus1235OP2mo ago
No description
redcaus1235
redcaus1235OP2mo ago
am i stupid i am on all and this is just what is showing me
ἔρως
ἔρως2mo ago
refresh the page
redcaus1235
redcaus1235OP2mo ago
now
No description
redcaus1235
redcaus1235OP2mo ago
is there something wrong?
ἔρως
ἔρως2mo ago
yes: 304
redcaus1235
redcaus1235OP2mo ago
what does it mean
ἔρως
ἔρως2mo ago
those are redirects
redcaus1235
redcaus1235OP2mo ago
that means? is that why it takes for only the 1 img to load that long
ἔρως
ἔρως2mo ago
it shouldn't be doing that, so
redcaus1235
redcaus1235OP2mo ago
so how can i change that i am on liveserver
ἔρως
ἔρως2mo ago
the images should be stored locally
redcaus1235
redcaus1235OP2mo ago
if the img are big enough there is no problem with the first img loading problem but why do the other img dont takeload time ?
ἔρως
ἔρως2mo ago
i don't know, im not seeing it
redcaus1235
redcaus1235OP2mo ago
oh okay but thanks for the help
ἔρως
ἔρως2mo ago
can you try it without the live server?

Did you find this page helpful?