I made an animated gif screenshot recording to demonstrate a code snippet, but I wanted to resize the image and make it loop. I found a useful website that has easy tools to do that. I reduced the size by 50% and made it auto-loop 30x. Then optimized it to reduce the file size from 1.9MB down to 134K.
If you need occasional .gif editing tools, check out this website (https://ezgif.com/):