Hy i think you are looking for the LayerSpritesheet extension.
Edit: it seems the link i pasted gives warning for me, if it does, you can ignore the link, and open readme through pixelorama's official extension explorer instead.
You can directly download it through Edit > Preferences > Extensions > Explore online.