You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/testing-deployment-publishing/publishing/web-publishing.md
+25-6Lines changed: 25 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,13 +40,23 @@ To add platform support, navigate to the **Setting and Integrations > Project Se
40
40
41
41
#### Advanced Web Settings
42
42
43
-
1.**Use Original Engine Initialization**: This uses original Flutter web engine initialization, which sometimes helps in better loading time in the deployed web app.
43
+
1.**Use CanvasKit**: Enabling this option can provide high-quality graphics and text rendering on web platforms.
44
44
45
-
2.**Use CanvasKit**: Enabling this option can provide high-quality graphics and text rendering on web platforms. **Note** that when using CanvasKit, some images can be blocked from loading if the server is not configured to allow loading them from other websites. To deal with this issue, you can set any of the following options, depending on where the images are hosted.
46
-
-**None:** If you are only loading images from your Firebase Storage, select this option and follow the steps [here](#). <!--pinkesh add link-->
47
-
-**Deploy with Firebase**: If images are not hosted on Firebase Storage *but you use Firebase to build your app*, choose this option and hit Deploy button.
48
-
-**Custom Proxy URL**: If you are not using Firebase or prefer to set up your own CORS proxy, you can specify your own Custom Proxy URL. If you don't have one, you can create one by following the steps [here](https://github.com/Rob--W/cors-anywhere).
49
-
3.**Import Emoji library**: Importing the Emoji library is necessary if your app may use emojis anywhere in any text widget. However, this will increase the size of your app on web.
45
+
2.**CORS Proxy for Images (Optional)**: When using CanvasKit, some images can be blocked from loading if the server is not configured to allow loading them from other websites. This happens because Flutter web uses WebGL for rendering, which requires access to raw image data and is subject to browser security restrictions called [Cross-Origin Resource Sharing (CORS)](https://docs.flutter.dev/platform-integration/web/web-images#cross-origin-resource-sharing-cors).
46
+
47
+
Choose the appropriate option based on where your images are hosted:
48
+
49
+
-**None**: If you are only loading images from your Firebase Storage, select this option and configure Firebase Storage for web access. FlutterFlow automatically excludes Firebase Storage images from CORS proxy requirements.
50
+
51
+
-**Deploy with Firebase**: If images are hosted on external servers (not Firebase Storage) *but you use Firebase for your app*, choose this option. FlutterFlow will automatically deploy a regional CORS proxy function to your Firebase project for optimal performance. Simply click the **Deploy** button that appears below this option.
52
+
53
+
-**Custom Proxy URL**: If you're not using Firebase or prefer to manage your own CORS proxy, specify your custom proxy URL here. If you don't have one, you can create one using services like [cors-anywhere](https://github.com/Rob--W/cors-anywhere) or CloudFlare Workers.
54
+
55
+
:::warning
56
+
**Performance Note**: Using a CORS proxy adds a network hop for external images, which may slightly increase loading times. For best performance, host images on Firebase Storage or a CORS-enabled CDN when possible.
57
+
:::
58
+
59
+
3.**Import Emoji Library**: Importing the Emoji library is necessary if your app may use emojis anywhere in any text widget. However, this will increase the size of your app on web.
50
60
51
61
:::info
52
62
@@ -55,6 +65,15 @@ Enabling web support automatically enables
55
65
56
66
:::
57
67
68
+
#### Troubleshooting CORS Issues
69
+
70
+
If you're experiencing image loading issues on web:
71
+
72
+
1.**Check browser console**: Look for CORS-related error messages
3.**Test proxy configuration**: Verify your custom proxy URL is accessible and functioning
75
+
4.**Firebase Storage setup**: Confirm Firebase Storage rules allow public read access for web
76
+
58
77
### 2. Make design adjustments (optional)
59
78
60
79
If you're creating a web-only application, setting the canvas size to desktop and building pages accordingly can work well. However, if you plan to target both mobile and web users, some design adjustments may be necessary to ensure that the UI is optimized for both platforms.
0 commit comments