Ideal-Image-Slider-JS icon indicating copy to clipboard operation
Ideal-Image-Slider-JS copied to clipboard

images with spaces won't load

Open ebbmo opened this issue 10 years ago • 2 comments

Hi Gilbitron,

I noticed an issue when implementing the slider - if an image in a folder contains a space, the image will not load. Removing the space in the file name solves the error. This affects images inserted with the "data-src=" property - for "src=" it works (standard html).

Do you think you could fix that?

Thanks & kind regards, ebbmo

ebbmo avatar Feb 21 '15 20:02 ebbmo

Hi @gilbitron common advice here is to avoid spaces in folders/filenames. Anyway I tested with spaces in filenames and it worked like a charm. Can you display the images without initializing them thought the slider ? BTW, what browser are you using... could be helpful for debug

RomainSauvaire avatar Feb 25 '15 12:02 RomainSauvaire

Hi Romain,

I agree with your advice on avoiding spaces. My issue is that the slider will display dynamically read pictures from a folder. And these pictures will be updated regularly. So even though I will tell the user to avoid spaces it might as well happen :/

I inserted the picuters without the slider - both display just fine (with & without space). I am using Chrome (Version 40.0.2214.115 (64-bit)

My setup is as follows:

  • index.php page which has a div for the slider (class slider)
  • then a js file which will read folder images (through a php file) and add these images to the slider o first picture containing src="path", second picture src="" and data-src="path"
  • after the images have been added, the slider will start with effect fade, transition 1200 and interval 4000. I also set the height.

In case you need my coding, let me know.

Kind regards, ebbmo

ebbmo avatar Mar 02 '15 12:03 ebbmo