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 Bolson2w ago
When calculating the container width maybe you should also take into account the gap between each image
redcaus1235
redcaus1235OP2w ago
it worked but somehow the first image always needs to load
ἔρως
ἔρως2w ago
set it as high priority
redcaus1235
redcaus1235OP2w ago
with js ?
ἔρως
ἔρως2w ago
no, with html
redcaus1235
redcaus1235OP2w ago
how <img src="bl1.jpg" alt="image 1" loading="eager" fetchpriority="high">
ἔρως
ἔρως2w ago
ypu, like that
redcaus1235
redcaus1235OP2w ago
still doesnt work
ἔρως
ἔρως2w ago
save the space for it then
redcaus1235
redcaus1235OP2w ago
it takes like 2-4 seconds to load still
ἔρως
ἔρως2w ago
yeah, that's bad no image should take that long
redcaus1235
redcaus1235OP2w ago
just the first img if i change the img to another img it still needs to load
redcaus1235
redcaus1235OP2w ago
nah on vscode i am using diffrent img on codepen it doesnt lag just on liveserver
ἔρως
ἔρως2w ago
can you show the size of the image?
redcaus1235
redcaus1235OP2w ago
width: 700px; all img have 700px
ἔρως
ἔρως2w ago
is that the actual size of the image? or just the css size?
redcaus1235
redcaus1235OP2w ago
css size
ἔρως
ἔρως2w ago
what's the actual size of the image?
ἔρως
ἔρως2w ago
i can imagine it taking quite a long time to load them all
redcaus1235
redcaus1235OP2w ago
but all loading normal only the first img is loading behinf
ἔρως
ἔρως2w ago
you should convert it to avif
No description
redcaus1235
redcaus1235OP2w ago
No description
redcaus1235
redcaus1235OP2w ago
Here the two make a problem I put lazy just as a test
ἔρως
ἔρως2w ago
show me the network tab in the developer tools
redcaus1235
redcaus1235OP2w ago
This one never used it before
No description
ἔρως
ἔρως2w ago
but show everything that's loaded, not just a single file
redcaus1235
redcaus1235OP2w ago
That’s all There is nothing else loading
ἔρως
ἔρως2w 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
redcaus1235OP2w ago
No description
redcaus1235
redcaus1235OP2w ago
am i stupid i am on all and this is just what is showing me
ἔρως
ἔρως2w ago
refresh the page
redcaus1235
redcaus1235OP2w ago
now
No description
redcaus1235
redcaus1235OP2w ago
is there something wrong?
ἔρως
ἔρως2w ago
yes: 304
redcaus1235
redcaus1235OP2w ago
what does it mean
ἔρως
ἔρως2w ago
those are redirects
redcaus1235
redcaus1235OP2w ago
that means? is that why it takes for only the 1 img to load that long
ἔρως
ἔρως2w ago
it shouldn't be doing that, so
redcaus1235
redcaus1235OP2w ago
so how can i change that i am on liveserver
ἔρως
ἔρως2w ago
the images should be stored locally
redcaus1235
redcaus1235OP2w 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 ?
ἔρως
ἔρως2w ago
i don't know, im not seeing it
redcaus1235
redcaus1235OP2w ago
oh okay but thanks for the help
ἔρως
ἔρως2w ago
can you try it without the live server?

Did you find this page helpful?