Multi image slider - issue

Hello everybody, new Blocs user.

I’m facing an issue when creating multi image slider in Blocs both using bloc&brics - like div and list - or most of the used js lib like Swiper, Tiny Slider and so on with the Code Editor support.

In all cases, everything run well if I use web linked images for every slide - Unplash, Pexels and manuy other - but if I use local image stored in my computer folder ( them reside in the same folder where my .bloc project is like /user/myname/documents/projectsfolder/img/image.jpg ), and checking results in preview mode or in the browser, I’ve got an empty space where the slide is: for info, all browser console return a “404 error/could not find image”.

I’m very struggled by this, did everything to understand the cause and read everything here relative to slider creation, but didn’t find a solution.

Someone that could help and drive me for a solution?

Thanks for support and…sorry for my bad English, lot of time I don’t speak and write in.

Mauro

Why not host your images directly on your server as locally hosted will not work when the site is live (unless exported within the Blocs project)?

Your link should be something like: https://myfancyswebsite.com/imagages/fancy_image_01.jpg

Hi Jerry, thanks for replay.

Perhaps my mistake in explanation: the site and relative things, slider included, are in the building/testing phase, not yet published.That’s why I can’t understand because of the weird issue.

Any idea?

Thanks and have a nice day
Mauro

Just to better understand, some screenshot before and after: they are based on Tiny Slider bloc from @PeteSharp Updated Site - #9 by apswoodwork post.

First two are from original setup of the slider, third and fourth are with my local img path edit.

Last one is the Mac path to my file, sorry… it’s in Italian language but think simple to understood in English.

Hope this could help.
Mauro

Hi @Mauro.

I would not use the code editor at all. There’s no need for it. Below is the sample file using card and image brics. I hope this helps.

TinySlide_Example_V3.zip (499.0 KB)

1 Like

As @jerry says. You don’t need the code widget. That was an old thread you referenced. :grin: must have been bloc 3 days I think.

2 Likes

Yes, it was when we were still young and handsome! :grin: :smiling_face_with_three_hearts:

2 Likes

Hi @Jerry @PeteSharp

thanks for help. I’ll have a look at the file later… Out for graduation party now :partying_face:

Back to you After test.

Mauro

Handsome? Let’s try and give GOOD information to those that need help!! :stuck_out_tongue_winking_eye:

Rich the Weather Guy

1 Like

@Jerry and @PeteSharp, thanks a lot fore your help: final thought… I’m quite stupid because solution was under my fingers

After three days of banging my head against the wall and it was all there, I understood that the slider do not work in preview mode but, if projects is exported with relative folders/image in everything run perfectly :crazy_face: :face_with_peeking_eye:

Anyway, another lesson learned.

Final question: do you think that for Splidejs is the same? I like much more Splide viewing options so a final thougth by you will be appreciated.

Nice day.
Mauro

Me too! I posted a while ago on how to add Splide to Blocs. Just use search to find it.