I've been using Excalidraw to create diagrams that I use in Twitter threads. Unfortunately it's difficult to manually scale diagrams to the correct aspect ratio in Excalidraw.
I finally figured out a solution to this problem, at least for Twitter!
Here's how I did it:
- Save this frame image and then import it into Excalidraw (I usually drag the image file onto the canvas)
- For each diagram you want to use on Twitter, duplicate the frame and scale your content to fit within its border
- When you're ready to export, first set the opacity of the artboard to
0%
and then select both the hidden artboard and the content - Add your new image to your Twitter post!
This works because the size of the frame matches the maximum size of Twitter post images, so as long as your content fits in the frame, it will be sized to fit correctly in a Twitter post.
If you followed these steps correctly, here's what the export pane looks like in Excalidraw:
If you followed the steps incorrectly, the export pane of Excalidraw will look like one of the following:
- incorrectly scaled: be sure to select the artboard and the content before exporting
- black border is in the image: be sure to set the artboard's opacity to
0%
before selecting it and the contents for export
You can see the difference in scaling between the first post (correct; using this method) and the second post (incorrect; exporting the content directly):
Top comments (0)