Is it possible to have variable frame time for each frame in a gif or apng image?

Say I want a specific frame (or multiple frames) to be displayed for a longer period of time in a gif or an apng, the file would be smaller if I specify a longer frame time for this frame instead of having the same image displayed in multiple consecutive frames having a short standard frame time.
I vaguely remember it is achievable in Matlab because you can specify the delay when appending each frame.
Is it possible in Julia? Is there any package that supports this?

I believe ffmpeg has something called filtergraph, which can do this. So if a Julia workflow has a customisable ffmpeg stage, you’re in luck. VideoIO.jl could do this as well, I suppose.