Spritesheet with animations of differing number of frames

Hey everyone, I’m new here and have been programming casually for a couple years now but am new to game development and just wondering what the normal procedure is for animations of different frame lengths. For the sprites I’m using there are more frames for the walk animations than the attack animations. So in effect what happens when using the same spritesheet (which is 8 tiles wide by 7 tiles high) is that the walk animations work fine since there 8 frames, but the attack animation only has 5 frames and so will animate the 3 blank frames in that row of the sheet before returning to the first frame, thus giving a flashing out effect at the end of the attack sequence.

I was just wondering if it’s best to have a second spritesheet for attack so that I could keep it to 5 tiles in width, or if there is a better way to go about this such as somehow indicating that when attacking, only play to frame 5 then restart? What would standard procedure normally be?

I hope this question hasn’t been asked a million times already, I did some googling but could really only find information on how to deal with different sized sprites/images, rather than differing number of frames per animation.

Thank you very much for any advice.