Best way to preload images in a GUI?

I’ve tried using the ContentProvider service to preload all the image assets, but even when doing that, the images still flicker briefly when I see them for the first time. :confused:

Is there any reliable way I could go about loading all the images I have for my game?

Thanks :slight_smile:

2 Likes

I think images can’t immediately load as there is gonna still be a slight delay on some of them. I would say leave them somewhere where they load (like far off in the distance in workspace) and just use those.

For a gui, just do the same thing but make the images off-screen

1 Like

Hey there!

If possible, create a loading screen that yields until all the images are loaded. There may be a way to do that with ContentProvider but I’m not entirely sure. If not, just put a slight delay of a couple seconds before loading in the game.

Hope this helps!

2 Likes

The only idea I had was to iterate over a list of image assets, and then either create new images that are visible using those IDs and leave them there for a second or two, then delete it. I’ve had success with that in the past, but I wondered if there was an easier way.

If you want some images to load instantly when you see them (no flickering) you can do this:
Put those images in a ImageLabel, with size 0, 0, 0, 0 and always visible, in a Enabled ScreenGui.
This way you wont get that weird flicker effect. (only do this for some images, it might lag or something if you do this with tons of images)

18 Likes