Create json from AE the size of the artwork, not the artboard?

I’m new to Lottie and AE. I’ve created an animation in AE, the export seems to work ok, but the size of the Lottie file to upload to the web is the width and height of the entire artboard (not sure if that’s the wrong term) I’d like to export just the artwork? Having that extra space around the animation makes it difficult to place it in elementor and adjust for that extra space.

For instance, as an example, if you search the mobile menu in the downloads library, some of them take up the whole preview screen, these are easy to place and adjust, some of them are small in the center of the square, when you place these you have to adjust the margin which causes that extra space to stick out beyond the actual widh of the page…

I know there are ways to fix this with CSS, but I’d like to just have my animation at the height and width of the artwork?

I feel like this is probably a basic setting somewhere?

So, not sure if this is the best way to go about this, or if this is the way to do this, but for anyone looking this up, I discovered if I fit the artboard in illustrator to the size of the artwork and save it that way then it imports the new composition at the same size in AE which will work sometimes. Sometimes I have an animation that will go outside of the artboard in AE though. I see you can change the width and height of the composition in AE, but there doesn’t seem to be like a free transform artboard type of tool?