For any animation, the best solution is to use images of the same size, so you can control the process yourself and get the expected result. If you can't resize all the frames yourself, the script on the server will do it this way: each frame will be set to a specified size so that no margins are left and then each frame will be cropped to a specified height and width. Thus the edges of some images (which have different aspect ratio - height/width) will be lost, but the center will remain completely.