When using the normal asset picker in Webstudio, exported Docker/self-hosted builds correctly rewrite asset URLs from: /cgi/image/ to optimized self-hosted paths such as: /_image/w_3840,q_80/assets/
However, when an asset is referenced through the expression editor using: assets.data["assetID"].url, the exported build still outputs the original /cgi/* URL. This results in a path that does not exist.
Reproduction Steps:
- Upload an asset such as an audio file
- Use the expression editor and reference the asset with:
assets.data["assetID"].url as the source. In this example we'll use an
- Export the project as Docker/self-hosted
- Run the exported app
- Observe broken asset URLs
Here's a cloneable project already setup: https://p-2e368a08-eb25-4773-839e-137e37938dc2.apps.webstudio.is/?authToken=f9e8fb0f-1a74-4612-b51a-d746c8706b5a&mode=preview
When using the normal asset picker in Webstudio, exported Docker/self-hosted builds correctly rewrite asset URLs from: /cgi/image/ to optimized self-hosted paths such as: /_image/w_3840,q_80/assets/
However, when an asset is referenced through the expression editor using: assets.data["assetID"].url, the exported build still outputs the original /cgi/* URL. This results in a path that does not exist.
Reproduction Steps:
assets.data["assetID"].url as the source. In this example we'll use an
Here's a cloneable project already setup: https://p-2e368a08-eb25-4773-839e-137e37938dc2.apps.webstudio.is/?authToken=f9e8fb0f-1a74-4612-b51a-d746c8706b5a&mode=preview