### Have you searched for existing issues (including closed ones)?
- [x] Yes, I… have searched the existing issues.
### Does this bug persist in a new vault with only Excalidraw installed?
- [x] Yes, I have verified the issue persists.
### Your environment
SYSTEM INFO:
Obsidian version: 1.12.4
Installer version: 1.12.4
Operating system: #14~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 15 15:52:10 UTC 2 6.17.0-14-generic
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Excalidraw v2.20.6
RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
### Your NotebookLM query
The embedded images produced by excalidraw suddenly have a maximum width that is less than half of the width of the page
---
If your embedded Excalidraw images are suddenly appearing smaller than expected, this behavior is likely controlled by the plugin's **default width setting** or a specific update to how small images are handled.
### 1. Check the Default Width Setting
The Excalidraw plugin has a global setting that defines the width of any embedded drawing that doesn't have a manual override.
* To adjust this, go to **Settings > Excalidraw > Embedding Excalidraw into your Notes and Exporting > Default width of embedded (transcluded) image**.
* The standard default is often **400 pixels**, which on many modern screens or wide pages will appear as less than half the width.
* You can increase this value (e.g., to **800** or more) to make your embedded images larger across your entire vault.
### 2. Manual Width Overrides
If you only want to change the size of a specific image, you can use the standard Obsidian pipe syntax:
* Use the format `![[Drawing Name|width]]` (for example, `![[Drawing Name|800]]`).
* You can also specify both width and height using the `![[Drawing Name|widthxheight]]` format.
### 3. Recent Sizing Logic Changes
A significant update (version 1.8.8) changed how images are rendered to be more "intelligent."
* **Previous Behavior:** Small images were stretched to match the "Default width" setting even if they were tiny, often resulting in blurry or oversized visuals.
* **Current Behavior:** If an image is smaller than your "Default width" setting, it will only extend to its **actual maximum size** rather than being forced to the default width. This ensures that small sketches remain crisp but may cause them to appear "suddenly" smaller if you were relying on the old stretching behavior.
### 4. Other Factors
* **Obsidian UI Scaling:** Note that as of Obsidian 1.7.1, the **Appearance settings** (font size and zoom) within Obsidian itself now affect the size of menu items and elements in Excalidraw.
* **CSS Classes:** If you are a power user, you can also use custom **CSS snippets** or the `cssclasses` front matter key to manipulate the display width of your drawings, including forcing them to be 100% of the page width.
---
setting the width to anything over 400 just makes the image 400 wide. For example ![[image.excalidraw|1200]] is still just 400 wide
---
The issue you are describing, where manual overrides like `![[image.excalidraw|1200]]` are capped at 400 pixels, is likely due to the **"Intelligent Image Width"** logic introduced in version 1.8.8 of the plugin.
Here is why this is happening and how to resolve it:
### 1. The "Intelligent Width" Constraint
Before version 1.8.8, small drawings were stretched to fill the default width setting, often resulting in blurry images. The updated logic now prevents this: **if a drawing’s actual content is smaller than the requested width, Excalidraw will not stretch it.** It will only extend the image to its actual content width or the "Default width" setting, whichever is smaller in that context.
* **Diagnosis:** If your actual drawing (the elements you sketched) only spans 400 pixels on the Excalidraw canvas, Obsidian will ignore your `|1200` request to prevent quality loss.
### 2. Check the Global Default Setting
Even with a manual override, a global setting may be interfering. Ensure your global default isn't acting as a hard cap:
* Go to **Settings > Excalidraw > Embedding Excalidraw into your Notes and Exporting**.
* Look for **Default width of embedded (transcluded) image**.
* The default is typically **400**. Try increasing this to **800 or 1200** to see if it releases the constraint on your transclusions.
### 3. Solutions to Force a Larger Size
If the "intelligent" logic is preventing you from reaching the desired size because the drawing content itself is "small," you have two options:
* **Add an invisible boundary:** Draw a large rectangle around your sketch in the Excalidraw file, then set its **stroke and background to transparent**. This trick increases the "actual width" of the drawing, allowing the plugin to render it at 1200 pixels without triggering the anti-stretch logic.
* **Use Custom CSS:** The release notes explicitly state that if you want to bypass the intelligent width logic, you can use custom CSS to force a 100% width for your drawings.
* **Check "Preserve image size when annotating":** If you are using the annotation feature, there is a specific setting under **Saving** titled "Preserve image size when annotating" that may be constraining the replacement link width.
### Summary of Manual Syntax
Ensure you are using the correct syntax for overrides. While `![[image|1200]]` is standard for width, you can also try explicitly setting both dimensions, such as `![[image.excalidraw|1200x800]]`, to see if the height requirement forces a re-render.
---
i checked by manually typing out widths in the embed link and the maximum width is actually 300. Other non excalidraw images are behaving normally.
---
The behavior you are experiencing, where manually specifying a width like `![[image.excalidraw|1200]]` is capped at 300 pixels while other images behave normally, is almost certainly due to the **"Intelligent Image Width"** logic introduced in version 1.8.8 of the plugin.
This logic was implemented to prevent drawings from becoming blurry or oversized when they contain very little content. Here is how to resolve the 300-pixel cap:
### 1. Understanding the "Actual Content" Constraint
Excalidraw now calculates the width based on the **actual elements** present on your canvas. If the items you have drawn only span 300 pixels of physical space on the Excalidraw coordinate system, the plugin will **refuse to stretch the image** beyond that width to preserve image quality. Even if you request `|1200`, the plugin will default to the smaller of the requested width or the actual content width.
### 2. Check the Global Default Width Setting
The plugin has a global setting that may be acting as a hard cap if your manual override is being ignored.
* Go to **Settings > Excalidraw > Embedding Excalidraw into your Notes and Exporting**.
* Look for **Default width of embedded (transcluded) image**.
* The standard default is often 400, but if yours is set to **300**, it will limit the display of your drawings. Try increasing this value to **800 or 1200** to see if it releases the constraint on your embed links.
### 3. The "Invisible Boundary" Workaround
If the "Intelligent Width" logic is capping you because your drawing is physically "small," you can force it to render larger by adding a hidden boundary:
* Draw a large rectangle around your entire sketch that matches the relative width you desire.
* Set both the **stroke and background color of this rectangle to "transparent"**.
* Because the rectangle is now technically a "content element," Excalidraw will include it in the width calculation, allowing your `|1200` override to function.
### 4. Custom CSS Override
If you want to completely bypass this "intelligent" sizing for all Excalidraw embeds, you can use **custom CSS**. By targeting the `.excalidraw-svg` class, you can force the images to occupy 100% of the available page width regardless of the internal content size.
### 5. Other Potential Caps
* **Markdown Embed Settings:** Ensure that the **Default width of a transcluded markdown document** (if you are embedding the markdown "back" of the note) is not set to 300.
* **Scale Settings:** If you are exporting to PNG, check the **PNG export image scale** in settings, as a low scale factor can result in smaller-than-expected resolution.
---
i did not get this issue before. Now i have excalidraw 2.20.5 and am seeing this behavior. In my settings i have the default width set to 1200
---
This behavior you are experiencing in version **2.20.5** is caused by the **"Intelligent Image Width"** logic introduced in version 1.8.8 of the plugin.
Before this update, Excalidraw would stretch any drawing to fill your "Default width" setting (in your case, 1200), even if the drawing contained only a tiny sketch, which often resulted in blurry or oversized images. The current version prevents this stretching to preserve image quality.
Here is why your manual overrides are being ignored and how you can fix it:
### 1. The "Actual Content" Constraint
Excalidraw now renders embedded images based on the **actual size of the elements** on your canvas.
* If your drawing (the objects, lines, and text you actually created) only spans **300 pixels** on the Excalidraw canvas, the plugin will refuse to render it at 1200 pixels, even if you use the `![[image|1200]]` syntax.
* It will always choose the **smaller** of the two values: your requested width (1200) or the drawing's actual content width (300).
### 2. Solution: The "Invisible Boundary" Trick
If you want the drawing to appear larger without adding more visible content, you can "trick" the plugin into seeing a larger content area:
* In your Excalidraw drawing, draw a large rectangle around your entire sketch that matches the relative width you want (e.g., spanning a wide area of the canvas).
* Set both the **stroke color** and the **background color** of this rectangle to **"transparent"**.
* Because this invisible rectangle is technically a content element, the plugin will include its dimensions in the width calculation, allowing your `|1200` override to function properly.
### 3. Alternative: Custom CSS Override
If you want to completely bypass this intelligent sizing and force all Excalidraw drawings to be 100% of the page width regardless of their content size, you can use **custom CSS**. By targeting the `.excalidraw-svg` class in an Obsidian CSS snippet, you can force a wider display.
### 4. Other Settings to Check
* **Markdown Transclusion Width:** If you are transcluding a markdown document as an image into Excalidraw, check the setting for **"Default width of a transcluded markdown document"** (found under **Settings > Excalidraw > Embed files into Excalidraw**). This is often set to a lower value (like 400 or 500) and will constrain those specific types of embeds.
* **Image Padding:** Ensure your **Image Padding** (found in **Export Settings**) isn't set to an extremely high value that might be interfering with the final render, though the default is typically only **10 pixels**.
### Describe the bug
When embedding an excalidraw drawing into a regular .md note the image width is capped at 300px when in editing view. Plugin setting "Default width of embedded (transcluded) image" and setting with with ![[image.excalidraw|<width>]] are ignored for widths above 300px. If the width is set to anything below (like 200) the image is correctly resized.
Embedded images were correctly sized in previous versions (now using 2.20.6, issue noticed also in 2.20.5)
### Steps to reproduce
1. In excalidraw plugin settings change the "Default width of embedded (transcluded) image" setting to 1200.
2. Create a (large) drawing using the excalidraw plugin called "image.excalidraw".
3. Create a regular .md note called "note.md"
4. Embed the drawing into the note.md file by using the standard embed syntax and set its width:
Note
![[image.excalidraw|500]]
5. View the note in editing mode
### Expected behavior
The image is expected to be 500px wide if using the |<width> modifier. Otherwise it is expected to be 1200px wide or as wide as the page. Neither of these things happen. The image width remains 300px.
### Additional context
<img width="777" height="193" alt="Image" src="https://github.com/user-attachments/assets/df63ba3f-993e-40d9-a04a-899c79a74a67" />
<img width="1665" height="1157" alt="Image" src="https://github.com/user-attachments/assets/009a8b51-da26-4e70-beec-0a1f7a3be938" />
<img width="1661" height="770" alt="Image" src="https://github.com/user-attachments/assets/d67c254f-202d-43f9-9166-468ffe5bf83b" />
Images are rendered correctly in reading view:
<img width="1665" height="1157" alt="Image" src="https://github.com/user-attachments/assets/0807c0a8-0c6d-4e5d-aece-4c8cc698d957" />