This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Bryan Sebesta
Posted Jul 14 - Read on Facebook

I have a prototype I'm building that has a slider, that flashes pages of a book as you move up and down the slider. The slider works fine, and I have the thumbnail images flashing correctly. But the images don't start loading (I think) until you move the slider up and down.

SO: my question is two-fold.

-Is there a way to tell when images are loading (i.e. when the event fires or before?)

-Is there a way to force load the images as soon as the browser window opens, so the images are ready?

1 Comments

Eelco Lempsink

Hi Bryan, first off, we’re working on a preloader that will fetch all images in advance. It’s already in Framer as a beta. You can try it out by putting `Framer.Extras.Preloader.enable()` in your code.

To answer your questions more directly:
- There’s no easy way to tell whether an image is loading, but you can listen to the event `Events.ImageLoaded` to tell when it’s done loading.
- You can use `Utils.loadImage(url, callback)` to load an image. (The preloader will do this for you.)

Read the entire post on Facebook