2

I am using to this slider on my website: http://flickity.metafizzy.co

The images load in squashed, but on refresh it sometimes appear as it should. I have decreased the images size, because I thought perhaps it was a loading issue, but that didn't help. I then added imagesLoaded, and that also did nothing.

I've attached a screenshot of how the images load. thanks!

http://imgur.com/OA66JK2

Alex Ljamin
  • 737
  • 8
  • 31
Seven N
  • 35
  • 1
  • 2
  • 8

1 Answers1

2

Check that you are using flickity.pkgd.js and not just flickity.js.

Check that your option is set correctly

// with jQuery
$('.gallery').flickity({
  imagesLoaded: true
});

-

// or with vanilla JS
new Flickity( '.gallery', {
  imagesLoaded: true
});

-

<!-- or in HTML -->
<div class="gallery js-flickity" data-flickity-options='{ "imagesLoaded": true }'></div>
desandro
  • 2,854
  • 1
  • 22
  • 31
  • Unfortunately this didn't work over here :/ https://stackoverflow.com/questions/62503849/flickity-wont-initialize-properly-unless-resizing-window-rails-6 – Mark Boulder Jun 21 '20 at 20:13