Skip to content

bug: app lagging when add images with higher quality #6542

@zox47

Description

@zox47

Duplicate Check

Describe the bug

I noticed the app is lagging with add image control with options higher quality.
My code is great than 15k line

Code sample

Code
import flet as ft


def main(page: ft.Page):
    page.title = "Image Example"
    page.theme_mode = ft.ThemeMode.LIGHT
    page.padding = 50

    gallery = ft.Row(expand=True, wrap=False, scroll=ft.ScrollMode.ALWAYS)

    for i in range(0, 30):
        gallery.controls.append(
            ft.Image(
                src=f"https://picsum.photos/200/200?{i}",
                width=200,
                height=200,
                fit=ft.BoxFit.NONE,
                repeat=ft.ImageRepeat.NO_REPEAT,
                border_radius=ft.BorderRadius.all(10),
            )
        )

    page.add(
        ft.SafeArea(
            expand=True,
            content=ft.Column(
                expand=True,
                controls=[
                    ft.Image(
                        src="assets/app_icon_512.png",
                        width=100,
                        height=100,
                        fit=ft.BoxFit.CONTAIN,
                    ),
                    gallery,
                ],
            ),
        )
    )


if __name__ == "__main__":
    ft.run(main)

To reproduce

Run the code image control with higher quality

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

Window 11

Flet version

0.85.2

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions