I like dumb code, so I actually don’t deal with it. In stead, I do this:
a) I make all frames of an animation equal width and height, which probably means adding plenty of blank space in the slimmer frames. Different animations can have different dimensions though
b) my positioning system does not orient from the top-left or bottom-left corner of a sprite/bob but from the center-bottom ‘pixel’. This keeps the thing in the same place no matter that there are differences in animation width; even if you would allow different frame widths. Using the center-bottom also just makes things like floor collision checks slightly easier.
Unfortunately to properly work with a) does require a tiny bit of extra effort; I generate bounding boxes on a per-frame basis by examining the blank space and making the bounding box fit as tight around the opaque area of the frame as possible. But meh, thats the type of code you write once and copy everywhere.