Issue 2 — Image Editor 404s on any asset with a rooted url
Severity: Image Editor unusable for affected assets
What happens
Opening an asset in the Image Editor shows "Failed to load image (404)" with an empty canvas. The same
asset displays correctly in the Assets grid.
Cause
ImageEditorPage.jsx:141 resolves the image via buildAssetUrl({ url: imageUrl }), where imageUrl comes
from the url query param — which is a rooted path:
url=/assets/images/T-Pose-ff22ee4f/76dd18c2-.../1785794111511-407918632.png
buildAssetUrl() (src/utils/meshTexturing.js:1535) normalises with:
const normalizedPath = String(rawPath)
.replace(/\\/g, '/')
.replace(/^data\/assets\//, '')
.replace(/^assets\//, '')
return assetUrl(normalizedPath)
Both regexes are anchored at ^ without allowing a leading slash, so /assets/images/… matches
neither. assetUrl() then prepends /assets/ again, producing:
/assets//assets/images/… → 404
The Assets grid is unaffected because it uses asset.url directly in an <img src> (AssetsPage.jsx:1201)
without re-normalising.
Reproduce
- Generate an asset so it gets a rooted
url (edits under images/<name>/<uuid>/… reliably do)
- Open it in the Image Editor → 404, empty canvas
- Network tab shows the doubled
/assets//assets/ path
Suggested fix
Allow an optional leading slash — one regex covers all four shapes:
.replace(/^\/?(?:data\/)?assets\//, '')
Issue 2 — Image Editor 404s on any asset with a rooted
urlSeverity: Image Editor unusable for affected assets
What happens
Opening an asset in the Image Editor shows "Failed to load image (404)" with an empty canvas. The same
asset displays correctly in the Assets grid.
Cause
ImageEditorPage.jsx:141resolves the image viabuildAssetUrl({ url: imageUrl }), whereimageUrlcomesfrom the
urlquery param — which is a rooted path:buildAssetUrl()(src/utils/meshTexturing.js:1535) normalises with:Both regexes are anchored at
^without allowing a leading slash, so/assets/images/…matchesneither.
assetUrl()then prepends/assets/again, producing:The Assets grid is unaffected because it uses
asset.urldirectly in an<img src>(AssetsPage.jsx:1201)without re-normalising.
Reproduce
url(edits underimages/<name>/<uuid>/…reliably do)/assets//assets/pathSuggested fix
Allow an optional leading slash — one regex covers all four shapes: