cancel
Showing results for 
Search instead for 
Did you mean: 

Optimizing image loading on STM32F407 embedded web servers for product-style pages

robert3
Associate II

ST moderator: updated the title with the MCU part number.

I am working on an embedded web interface hosted on an STM32-based system using lwIP. The interface serves basic HTML pages along with multiple product images for browsing and preview.

On pages that contain several high-resolution images, similar in structure to pages like  this:

AndrewNeil_0-1770031973804.png

I notice slower load times and occasional rendering delays when everything is served directly from the MCU web server.

For those with experience building embedded web servers on STMicroelectronics platforms, what techniques have you found most effective for improving image delivery and overall page responsiveness?
Examples could include compression approaches, external memory usage, filesystem choices, or caching strategies.
Looking for practical guidance based on real implementations.

9 REPLIES 9
mƎALLEm
ST Employee

Hello,

What STM32 part number are you using? 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Andrew Neil
Super User

Is a microcontroller really an appropriate platform for this type of application?

Remember that the "Lw" in "LwIP" stands for Lightweight: it is targetted and optimised for low resources - not high performance!

 


@robert3 wrote:

 I notice slower load times .


Slower than what?

What profiling/debugging have you done to find what's going on?

LwIP Debugging & diagnostics

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
Super User

How large are the images? They don't look like they need to be large files. How long does the page take to load?

Easiest approach would be to use smaller sized images. Not many knobs on the STM32F4 in terms of increasing speed.

If you feel a post has answered your question, please click "Accept as Solution".

I am using the STM32F4 series. It’s been great, but I am running into issues with slow image load times when displaying multiple images on a single page.

Would appreciate any STM32F4 specific suggestions on improving this.

Hi @Andrew Neil,

You’re right, LwIP is lightweight and might not be the best for high-performance tasks.

By "slower," I mean delays when loading several high-res images. I have done some profiling, but looking for suggestions on optimizing memory or using external resources like flash or SD.

Hi @TDK ,

The images are about 500KB-1MB each, and the load time can reach 3-6 seconds.

I’m looking into compression, but any tips on improving LwIP’s handling of larger files would be helpful without losing quality.


@robert3 wrote:

I am using the STM32F4 series. It’s been great, but I am running into issues with slow image load times when displaying multiple images on a single page.

Would appreciate any STM32F4 specific suggestions on improving this.


Hello,

You still need to provide the part number: How to write your question to maximize your chances to find a solution

mALLEm_0-1770105986758.png

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

I am using the STM32F407VG part specifically

mƎALLEm
ST Employee

As others said, may be STM32F407 is not the right MCU for that purpose. You need something more performant. STM32H7 or STM32N6 or even STM32MPx series.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.