mirror of
https://github.com/penpot/penpot.git
synced 2026-09-16 17:06:17 +00:00
The workspace-thumbnail-by-id ref unconditionally called resolve-media on thumbnail URIs, which caused a stack overflow when the URI was a data URI (which can be megabytes long for large images). Data URIs contain thousands of '/' characters (base64 uses '/' as one of its 64 characters), causing lambdaisland.uri/join to iterate thousands of times in remove-dot-segments and overflow the JavaScript call stack. Add a resolved-uri? helper that checks if the URI already starts with 'blob:' or 'data:', and skip resolve-media for those cases. Only call resolve-media when the URI is a plain UUID (media-id from the server). Closes #11562 AI-assisted-by: qwen3.7-plus