If you try to upload a huge image into a diagram you will receive an error to the effect of "image too big". Very large images are best hosted outside of diagrams and referred to by URL.

You can attach the large image to the page where the diagram is hosted by navigating to the attachments view of the page:

And dragging and dropping the image into the attachments view. Note that Confluence Server has a default attachments max size of 10MB. You can increase that in the General Configuration admin section at https://BASE_URL/admin/viewgeneralconfig.action.

When the image is uploaded, go back to the main Confluence page and edit the diagram on that page. Click the "+" pulldown on the toolbar and select "image":

In the dialog that appears you can select the image from current page attachments:

Just be aware that saving generates a preview of the diagram on the Confluence page, you may wish to resize very large images in the diagram so the preview isn't too large for Confluence.