• Wei S. Jiang

WebApp Image Rendering Configuration

Since Flutter supports both mobile and web applications, it has 2 different kinds of renderers. The most common is HTML, which is used by default for mobile builds. With the introduction of a stable web version of Flutter, the Webapp version uses CanvasKit Renderer, which is more efficient.


While running the app on the web, you may encounter the following in your app:


The images are not loading in places where they should be.


You might also see this error message in your terminal:

*Rest of URL blurred to prevent token and location of our storage to be seen by the public*


To keep things simple, we will simply tell Flutter that we want to use HTML Renderer as the default. The Webapp uses CanvasKit because it is more efficient for the web.



Running Locally

When you are writing code and want to see images when building and testing, run the following command to run the app using HTML Renderer:

flutter run -d chrome --web-renderer html


Deployment

When you deploy the app for the web, you have to first build the web version and then send it using the terminal (this is explained in another guide).


To build the app so that it is using HTML Renderer when users visit the website, use the following command:

 flutter build web --web-renderer html --release

as opposed to the old way of building:


flutter build web



Recent Posts

See All

WEquil App Development Workflow

Introduction The purpose of this document is to outline the workflow for app development at WEquil. WEquil’s app development process is a bit different from traditional app development in that develop

Firebase Init - Failed to get <your_project>

The Error Error: Failed to get Firebase project <your_project_name_on_Firebase>. Please make sure the project exists and your account has permission to access it. The following error happens when you